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

more elaborative error message #7

Open
drummerwolli opened this issue Mar 1, 2016 · 1 comment
Open

more elaborative error message #7

drummerwolli opened this issue Mar 1, 2016 · 1 comment

Comments

@drummerwolli
Copy link

i was trying this out from the examples:

tokens.configure()
tokens.manage('example', ['read', 'write'])
tokens.start()
tokens.get('example')

got an error message:

requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://example.com/oauth2/access_token

this did not help in finding the real error which i got through printing out the real error message with print(r.text):

{"error":"invalid_scope","error_description":"Unknown/invalid scope(s): [write, read]"}

the line is https://github.com/zalando-stups/python-tokens/blob/master/tokens/__init__.py#L119 ... maybe we can have a more detailed error message, in case an error happens ...

@hjacobs
Copy link
Contributor

hjacobs commented Mar 1, 2016

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants