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

Improve Error Handling #10 #11

Merged
merged 2 commits into from
Aug 8, 2016
Merged

Conversation

shuron
Copy link
Contributor

@shuron shuron commented Jul 28, 2016

This should improve error handling.
New SendGridResponseHandler was introduced, that ist capable to parse body even on http response status >300.

Also small refactoring of same code.

@thinkingserious
Copy link
Contributor

You are awesome @shuron!

Could you please submit a CLA so we can merge this? https://github.com/sendgrid/java-http-client/blob/master/CONTRIBUTING.md#cla

Thanks!

@thinkingserious thinkingserious added type: community enhancement feature request not on Twilio's roadmap status: cla needed labels Jul 28, 2016
@thinkingserious
Copy link
Contributor

Looks like we will need a CLA from @aholbreich too.

@aholbreich
Copy link
Contributor

You shouuld have them for @shuron and @aholbreich in the mean time.

@thinkingserious
Copy link
Contributor

Hello @aholbreich,

I have had a chance to review the pull request.

Could you please provide a usage example? Ideally, here: https://github.com/sendgrid/java-http-client/blob/master/examples/Example.java

Thank you!

@aholbreich
Copy link
Contributor

aholbreich commented Aug 3, 2016

The whole Pool request does not change API behavour of the any call off:

response = client.api(request);

it only improve the situation with verbosity of response body responses with http eror codey >=300.

I didn't wanted to break any API behaviour with this pull request, so at the end only the Exception Message is more verbouse now and containes body by chance it was send within your backend API response. e.g.

Request returned status Code 400 Body: XYZ is not accepted for being longer than ABC.

So examples applicable unchnaged.

@thinkingserious thinkingserious merged commit 79d1539 into sendgrid:master Aug 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: community enhancement feature request not on Twilio's roadmap
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants