sendgrid / ruby-http-client

SendGrid's Ruby HTTP Client for calling APIs
https://sendgrid.com
MIT License
23 stars 54 forks source link

Raise error on 4xx/5xx response #121

Open boardfish opened 4 years ago

boardfish commented 4 years ago

Feature Request Summary

In the event of an erroneous response, I'd like to be able to raise an exception rather than look for those error conditions manually. Faraday can already do this according to the spec I desire using the Faraday::Response::RaiseError middleware, but in this case I'm using sendgrid-ruby to make requests to SendGrid.

To introduce the change in a non-breaking way, this gem shouldn't raise errors by default.

childish-sambino commented 4 years ago

Similar to https://github.com/sendgrid/sendgrid-csharp/issues/775

This issue has been added to our internal backlog to be prioritized. Pull requests and +1s on the issue summary will help it move up the backlog.