8000 Raise exceptions for unexpected status codes by sigmavirus24 · Pull Request #789 · sigmavirus24/github3.py · GitHub
[go: up one dir, main page]

Skip to content

Raise exceptions for unexpected status codes #789

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

Merged
merged 1 commit into from
Mar 13, 2018

Conversation

sigmavirus24
Copy link
Owner

Also raise exceptions on any 400 or greater status code as discussed in
gh-670

As it stands today, it's hard for people to determine whether None is
returned because that's the API's response or because None is what we
return in the event of a 404 or some other "error"-like status code.

This change undoes that ambiguity and allows people to handle missing or
permission-related problems using exceptions.

Also raise exceptions on any 400 or greater status code as discussed in
gh-670

As it stands today, it's hard for people to determine whether None is
returned because that's the API's response or because None is what we
return in the event of a 404 or some other "error"-like status code.

This change undoes that ambiguity and allows people to handle missing or
permission-related problems using exceptions.
@sigmavirus24 sigmavirus24 merged commit bbb176b into develop Mar 13, 2018
@sigmavirus24 sigmavirus24 deleted the raise-http-errors branch March 13, 2018 02:11
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
0