sendgrid-nodejs icon indicating copy to clipboard operation
sendgrid-nodejs copied to clipboard

Error Exception Handling

Open thinkingserious opened this issue 7 years ago • 4 comments
trafficstars

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

thinkingserious avatar Oct 20 '18 23:10 thinkingserious

@thinkingserious, just forked this repo. If I have any doubts I talk to you through here :)

Fazendaaa avatar Oct 31 '18 21:10 Fazendaaa

Awesome! Thank you!

thinkingserious avatar Oct 31 '18 22:10 thinkingserious

@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?

Fazendaaa avatar Oct 31 '18 22:10 Fazendaaa

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?

abhijit-hota avatar Nov 10 '20 05:11 abhijit-hota