You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was hoping to use wrap_and_check around some sendgrid-ruby requests, which return non-2XX response codes rather than raising exceptions. However the SendGrid::Response object exposes its status code through status_code() rather than code().
I can monkey-patch sendgrid-ruby to provide the code() method, but I wonder if this might be a nice configuration option for http-exceptions instead - maybe something like:
A great looking gem. 👍
I was hoping to use
wrap_and_check
around somesendgrid-ruby
requests, which return non-2XX response codes rather than raising exceptions. However theSendGrid::Response
object exposes its status code throughstatus_code()
rather thancode()
.I can monkey-patch
sendgrid-ruby
to provide thecode()
method, but I wonder if this might be a nice configuration option forhttp-exceptions
instead - maybe something like:Or, perhaps an option to
wrap_and_check
would be even better?If you think this might be useful, I'd be happy to wrap up a PR for it.
The text was updated successfully, but these errors were encountered: