Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix image download error handling in "gulpfile.js" and "downloadSingleImage.js" from issue #1283 #1284

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ZODIAC3K
Copy link

  • I've checked that this isn't a new swag opportunity proposal.
  • I've checked that this isn't a duplicate pull request.

Changes Made

  • Updated gulp.task("swag-img:download") in gulpfile.js to handle image download errors gracefully by logging warnings instead of throwing errors.
  • Enhanced the downloadSingleImage function to implement retry logic for failed downloads, allowing for up to 3 attempts.
  • Improved error logging and cleanup for partial downloads, ensuring smoother build processes.

Reference

Check issue #1283 for reference.
Note: I did this under Hacktoberfest.

Additional Note

P.S. I am using a VS Code extension called Prettier, which formats the code automatically. This is why there are so many changes in the formatting.

- Updated `gulpfile.js` to handle image download errors gracefully by logging warnings instead of throwing errors.
- Enhanced `downloadSingleImage` function to implement retry logic for failed downloads, allowing for up to 3 attempts.
- Improved error logging and cleanup for partial downloads, ensuring smoother build processes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant