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

Handle all possible Guzzle request exceptions #879

Merged
merged 1 commit into from
Jul 19, 2021

Conversation

b1rdex
Copy link
Contributor

@b1rdex b1rdex commented Jul 19, 2021

RequestException is just a subset of possible exceptions thrown while performing the request.
For example, connection failure leads to ConnectException and so on.

The best way is to catch all GuzzleException instances and wrap them in TelegramSDKException.

Also, I added the original exception as an argument to TelegramSDKException so it can be retrieved in the app later.

`RequestException` is just a subset of possible exceptions thrown while performing the request.
For example, connection failure leads to `ConnectException` and so on.

The best way is to catch all `GuzzleException` instances and wrap them in `TelegramSDKException`.

Also, I added the original exception as an argument to `TelegramSDKException` so it can be retrieved in the app later.
@irazasyed irazasyed merged commit 5504b56 into irazasyed:develop Jul 19, 2021
@irazasyed
Copy link
Owner

Thanks!

@b1rdex b1rdex deleted the patch-1 branch July 20, 2021 02:17
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

Successfully merging this pull request may close these issues.

2 participants