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

Raise a specific exception when API fails with a 5XX HTTP response #254

Open
kaderate opened this issue Aug 6, 2024 · 0 comments
Open

Comments

@kaderate
Copy link

kaderate commented Aug 6, 2024

When MangoPay API returns a 5XX, we receive a generic MangoPay::ResponseError that we must decode to identify from the response code that it's a network/internal error (a 502 for example).

It could ease error handling for the SDK users to raise a specific exception in those cases. For example, it allows them to silently retries on network errors, and immediatly raise in case of client (4xx) error.

@kaderate kaderate changed the title Smoothly network errors Raise a specific exception when API fails because of a network errors Aug 6, 2024
@kaderate kaderate changed the title Raise a specific exception when API fails because of a network errors Raise a specific exception when API fails with a 5XX HTTP response Aug 6, 2024
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

1 participant