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

In processResult ErrorResponseException is never thrown if there is a Guzzle Exception #59

Open
tm1000 opened this issue Dec 22, 2020 · 4 comments

Comments

@tm1000
Copy link
Contributor

tm1000 commented Dec 22, 2020

See: https://github.com/Weble/ZohoBooksApi/blob/develop/src/Client.php#L218

If there are errors from upstream Zoho (like 400) then the Guzzle Exception is thrown instead of ErrorResponseException. Perhaps this is intentional but this was not the case in previous versions, and thus if it is intentional then ErrorResponseException should not say it is the base class for all Exceptions

@Skullbock
Copy link
Contributor

Hi! You're basically saying that here:

https://github.com/Weble/ZohoBooksApi/blob/develop/src/Client.php#L197

We should do

throw new ErrorResponseException($e->getCode(), $e->getMessage(), $e);

instead of throw $e right?

Can you send a PR in for that?

@Skullbock
Copy link
Contributor

@tm1000 where you able to fix this in the end?

@tm1000
Copy link
Contributor Author

tm1000 commented Feb 25, 2021

@Skullbock I'll spend some time working on this during my development (as im using all of your libraries exclusively now)

@Skullbock
Copy link
Contributor

Thanks @tm1000 glad to hear that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants