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
Do we really have to catch Guzzle RequestException in getResponse? #70
Comments
Ok, I got the point. The reason was to be more independent from http client package. I mean if someday we will switch from Guzzle to something else, it would be smooth operation without major changes and developers will not have to change their code to handle |
Thanks for the explanation, I understand now.
In my situation it is important to check, if the exception is a • I think it would be wrong to switch to Guzzle's exceptions, because • I think it would be good to switch to Guzzle's exceptions, because Of course it's on you to switch or not, I can use my synchronized private fork anytime, just wanted to share my thoughts and ideas :) |
Sure, thanks for sharing your opinion, appreciated that. |
This issue is about to receive a good update in v5.1.0 🎉 |
Great job, props to you for still maintaining this repo and taking care of the feedbacks! |
Hi!
I'm working on a project that uses this library, and I noticed that in the getResponse function, there is a try-catch block (line 288-295) around the Guzzle request, which just re-throws the error message. The problem is that, this way I can't really build a good error handling around the translation process, because I can't tell the difference between ConnectException, ClientException, ServerException, etc., which would be great in my opinion.
Do we really have to catch Guzzle RequestExceptions in getResponse?
Can you tell me, what is the purpose of catching and re-throwing the Exceptions there?
The text was updated successfully, but these errors were encountered: