-
Notifications
You must be signed in to change notification settings - Fork 21
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
Call to undefined method GuzzleHttp\Exception\ConnectException::getResponse() #42
Comments
@TechPrivacyLab could you please check the changes in #51. This is the best I could come up with now, to only wrap the response if one exists, and re-throw the error otherwise. @jepf do you perhaps remember why the try/catch was done at all? Is it really required? |
The try/catch is common practice for error handling at this point. Possible solutions: Be sure to not break the behavior by returning something unexpected to the caller. |
@jepf can you check my proposed changes in #51 please? It should not break anything, because it a) returns the error response if one is available and b) does not cause an unrelated |
In
zammad-api-client-php/src/HTTPClient.php
Line 183 in 83f0129
getResponse()
method is undefined.To reproduce it I put in the
ZammadAPIClient\Client
constructor a wrong URL:In this case
$e
is an instance ofGuzzleHttp\Exception\ConnectException
with nogetResponse()
method.The text was updated successfully, but these errors were encountered: