better error messages on server upload#549
Conversation
b05201d to
fea3daf
Compare
There was a problem hiding this comment.
❤️ thanks for the PR 💪
For me putting the status code at the end makes it easier to read, especially since in all case except the default the status code more or less says the same as the error message.
It would give a log output like this:
Client attempted to send an invalid URL parameter, statusCode=400
Could not find server route, statusCode=404
Server failed 'file is undefined', statusCode=500
I've not done a lot of work in this module so I suggest waiting for others to chime in before changing anything in your PR 😄
wkillerud
left a comment
There was a problem hiding this comment.
Thanks for the PR 🙌
Adding err.message to the generic errors makes sense for sure 👍 Not sure about the status codes though (at least outside default:) since the error messages are distinct. Anyway, looks good to me ✅
## [2.0.38](v2.0.37...v2.0.38) (2024-05-13) ### Bug Fixes * include message from base error for unexpected status codes ([#549](#549)) ([d5637df](d5637df))
|
🎉 This PR is included in version 2.0.38 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
Sometimes asset uploads fails with error messages:
Error: Error: Server failedError: Error: Server was unable to write file to storageWe need some more information about status code and message from the response to debug this.