Closed mduecker closed 4 years ago
Yeah, we should be able to catch errors from Cloudinary's SDK and axios requests to output more helpful errors. Let me know if you have any questions as you dive in! Looking forward to your PRs. Thanks for being willing to help!
Hi, I also faced such issue.
However printing node for the issue helps with debugging as it turned out the file that plugin was trying to transform was incomplete. @jlengstorf please tell me if you feel this is sensible and I'd add reported info with the node that has problem.
EDIT: after some more experimentation on processing images from wordpress blog (~160 posts, ~430 assets). I've faced a number of errors:
The only way to make the build work was to not create nodes when upload to cloudinary failed (but you still cannot use these resources so it solved nothing).
On each build attempt few files (too big + invalid for some reason) fail on regular and some seem to fail on random.
Added a try/catch to the Cloudinary uploader so errors from uploads are logged. The rest of the errors I believe are handled by Gatsby. Also, @masives, the errors with uploading multiple images are fixed in #21. With the breakpoints, you can specify custom min and max breakpoints in the gatsby-config.js
options for the plugin.
@mduecker kindly re-open this issue and suggest any other error logging enhancements if any and we'll be sure to put them in. Closing this for now :)
Could we add more detail to the error messages (during build)? If this is something that can be done within the plugin, I'm happy to work on a PR for this.