Where can I find the list of all the errors which the @sendgrid/mail
client will throw while sending email?
I inspected the library code its returning request
promises at the end. I need to identify the error in my catch
block used with async/await
as there are other requests as well in the same block where sendgrid call is initialized.
You would put another try/catch around the sendgrid module to handle those errors :)
Hello @umarhussain15,
Here is a list of all the errors that SendGrid could possibly throw.
Thanks for helping out @kevinsimper!
With Best Regards,
Elmer
Thanks, I forgot to look at the docs. I was only looking at guide.
@kevinsimper thanks for solution regarding try/catch. I was converting my code from promises chaining to async/await, so I was hesitant to use mutiple try/catch but in the end this gives more control.
Most helpful comment
You would put another try/catch around the sendgrid module to handle those errors :)