-
Notifications
You must be signed in to change notification settings - Fork 43
Return fault status code on thrown HTTP client exceptions #20
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
Conversation
…de underlying reason in the response
Hello @davidhagg, |
I won't be able to send in the CLA requested, but you could look at this code as inspiration and implement it in a similar fasion :-) |
I'm not sure this is the ideal solution. It's faking an HTTP 500 response, even though no such response was actually received from the server. It also still hides the original exception (exception message can be seen in the response content, but can't be caught by code using this library). |
Thank you @davidhagg! I believe we will pursue the solution proposed by @Tarball here: #6 Do you have any thoughts on that proposal? Thanks! |
Hi @thinkingserious yes I'm fine with that solution. The only thing is that it is a breaking change so just make sure to bump the version correctly. Thanks! |
Hello @thinkingserious, do you have an update on the progress of fixing this issue? We are having intermittent issues with calling SendGrid, but we cannot see the underlying cause for this with the current code. |
Hi @davidhagg, This issue is fairly low on our backlog for the following reasons:
If 1 & 2 gain traction, that will help push it up our backlog for implementation. I hope this information helps. Thanks! With Best Regards, Elmer |
Ok, thanks. |
Thanks @davidhagg! I've added your vote to that issue to help move it up our backlog. |
Hi @davidhagg, This issue is now fixed: sendgrid/sendgrid-csharp#434 Thanks! |
Return status code 500 for exceptions thrown by HTTP client and include underlying reason in the response.
This will make it clearer for the consumer of the api to handle fault responses and see the causes of underlying issues.