Handle HTTP error to avoid throwing exceptions

Sendgrid crashes application on HTTP error