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

More error tolerant attempt to save /fetch remote image #231

Open
PhilGale92 opened this issue Aug 19, 2024 · 2 comments · May be fixed by #245
Open

More error tolerant attempt to save /fetch remote image #231

PhilGale92 opened this issue Aug 19, 2024 · 2 comments · May be fixed by #245

Comments

@PhilGale92
Copy link

Heya! one more quick potential change from me to gather thoughts.

Im using this tool to use SSG by conecting to contentful and downloading all the remote images. Now sometimes contentful fails to provide the image. Would it be possible to add a mode to downloadImagesInBatches in which the Unable to save ${formattedFilename} (empty file). error (and maybe other errors). Resolve() out rather than rejection.

Just as otherwise i'd have to query every image first / it seems a shame for the whole process to die out because of one image-download failure.

Hope the above makes sense, again if you okay it im happy to give it a go to make the change. Thanks,

@Niels-IO
Copy link
Owner

Niels-IO commented Nov 16, 2024

Would a retry mechanism help to mitigate the issue? I would like to still fail the process if one remote image does not load. (People running this in CI would complain otherwise)

@PhilGale92
Copy link
Author

PhilGale92 commented Nov 17, 2024

Yeah that might just work! - I'll chuck your PR on our preprod site CI where i can reliably hit the issue when I get a chance and will try to get back to you hopefully in a week or so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants