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

Meaningless error message #23

Open
dosas opened this issue Oct 16, 2023 · 0 comments
Open

Meaningless error message #23

dosas opened this issue Oct 16, 2023 · 0 comments

Comments

@dosas
Copy link
Contributor

dosas commented Oct 16, 2023

When sending an access_token request that returns an error, KeyError: 'access_token' is raised instead of a meaningful error message:

Wouldn't something like this be more meaningful?

#  token_data = {'error': 'invalid_grant', 'error_description': 'Invalid refresh token'}
if token_data.get("error") is None:
    raise RuntimeError(f'Obtaining access token failed: {token_data["error_description"]}')

self._access_token = token_data["access_token"]
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