Improve Error Handling #10#11
Conversation
|
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! |
|
Looks like we will need a CLA from @aholbreich too. |
|
You shouuld have them for @shuron and @aholbreich in the mean time. |
|
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! |
|
The whole Pool request does not change API behavour of the any call off: 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.
So examples applicable unchnaged. |
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.