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

New feature: RaiseError #792

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

New feature: RaiseError #792

wants to merge 1 commit into from

Conversation

c960657
Copy link
Contributor

@c960657 c960657 commented Oct 4, 2024

The library raises errors if the server does various unexpected things, e.g. TooManyRedirectsError, but it does not raise if the HTTP status code indicates a client error (4xx) or server (5xx) error.

Sometimes you are interested in non-successful responses, and sometimes you just want to treat them as any other error triggered by the server.

This PR adds a new feature that will raise an exception on status codes representing an error. If you want to skip this for specific codes, you can specify them in the ignore option.

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.

1 participant