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
BadCredentialsException not raised on GitHub enterprise #934
Comments
PR please I will review |
I think this may have broken something. If I run v1.43.2, my script works; if I run 1.43.3, I get 401 {u'documentation_url': u'https://developer.github.com/v3', u'message': u'Bad credentials'}. The credentials are good. |
@Zoom67 Can you share the script? |
I can share a snippet with some values fudged. It's very simple. Creating this object throws an exception, and the error message contains the JSON above.
|
Yep, that did it - thanks! I changed that line to be fully qualified, just to be sure.
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
On Github Enterprise, the API message does not read "Bad credentials" when incorrect credentials are supplied. It reads "Must authenticate to access this API."
Might be better to just go off of the 401 code as opposed to the error message.
if status == 401 and output.get("message") == "Bad credentials":
should be
if status == 401:
The text was updated successfully, but these errors were encountered: