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

Don't throw exception for token error response. #844

Merged
merged 2 commits into from
Feb 11, 2023

Conversation

zamzterz
Copy link
Contributor

  • Changes are covered by tests.

When upgrading the pyoidc dependency from 1.4.0 to 1.5.0 in Flask-pyoidc it revealed a breaking API change (by breaking this test): AHttpError exception is thrown for token error responses, without any possibility of recovering the error response.

This change brings back the behavior in 1.4.0 which returns the token error response allowing for further handling.

Copy link
Collaborator

@schlenk schlenk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Seems i missed the late conversion to the ErrorResponse type in the parse_response() code that runs only after this block, so the issubclass() failed for this case.

@schlenk schlenk merged commit f6c590c into CZ-NIC:master Feb 11, 2023
@zamzterz zamzterz deleted the handle-token-error-response branch February 11, 2023 15:17
@zamzterz
Copy link
Contributor Author

@schlenk Thanks for the quick response! Any chance of getting this in a patch release?

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.

2 participants