Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IOException is thrown if the Response after send email is non 2xx #184

Closed
sanaulla123 opened this issue Feb 27, 2017 · 6 comments
Closed
Labels
status: help wanted requesting help from the community type: community enhancement feature request not on Twilio's roadmap

Comments

@sanaulla123
Copy link

Issue Summary

IOException is thrown from the api() method of SendGrid (originating from Client#executeApiCall() method) if the Response of send email is non 2xx.

We would like to get back the error in the form of a Response object.

Technical details:

  • sendgrid-java Version: 3.1.0
  • Java Version: 1.7
@thinkingserious thinkingserious added status: help wanted requesting help from the community type: community enhancement feature request not on Twilio's roadmap labels Feb 27, 2017
@thinkingserious
Copy link
Contributor

Thank you for the suggestion @sanaulla123, I have added it to our backlog.

For this issue to rise in priority, we need others to +1 this issue or a PR.

With Best Regards,

Elmer

@sanaulla123
Copy link
Author

is there some history behind throwing IOException? because I see a comment there stating the exception is thrown to support other APIs or something like.
If not , then I can work on the PR for it.

@thinkingserious
Copy link
Contributor

@sanaulla123,

I'm not entirely sure, but I think what you propose is sane. We would greatly appreciate your PR :)

@Ronpgo
Copy link

Ronpgo commented Sep 9, 2017

It is especially a problem for the delete api which returns 400 if all the elements are already deleted.
Because the exception does not perserve the headers, it is very easy to hit the rate limit and start getting 429s. i.e. the client has no idea how long to sleep under these conditions.

@thinkingserious
Copy link
Contributor

Thanks @Ronpgo,

I've added your vote to this issue.

@thinkingserious
Copy link
Contributor

This will be resolved here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: help wanted requesting help from the community type: community enhancement feature request not on Twilio's roadmap
Projects
None yet
Development

No branches or pull requests

3 participants