sendgrid-nodejs
sendgrid-nodejs copied to clipboard
Error Exception Handling
Issue Summary
To improve the developer experience, we would like to pass back a summary of the error received and a link to the appropriate place in the documentation to help with troubleshooting.
Acceptance Criteria
- When an error is thrown due to a failed request, a summary of that error along with a link to the appropriate place in the documentation should be sent back as a JSON object.
- Tests that demonstrate successful functionality
@thinkingserious, just forked this repo. If I have any doubts I talk to you through here :)
Awesome! Thank you!
@thinkingserious, before making it any changes I've decided to yarn test:mail as described in the testing. To do this kind of testing do I need a Sendgrid App Key as described in Environment Variables?
Status of this? I've been thinking to post an issue about this.
I've been handling the TOO MANY REQUESTS error like this.
if(error.code === 429) {
console.log("Email quota exceeded. Please try tomorrow.");
}
The error code is mentioned here: https://sendgrid.com/docs/API_Reference/Web_API_v3/Mail/errors.html
Am I doing it right?