Skip to content

Try to fix exception propagation from REST api #873

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
Oct 8, 2024

Conversation

ponyisi
Copy link
Collaborator

@ponyisi ponyisi commented Oct 3, 2024

This fix (cribbed from vimalloc/flask-jwt-extended#141) allows the reauthentication errors to be correctly propagated to the users as status 401 instead of 500 (I guess it installs the correct exception handlers). However of course this could potentially affect the handling of errors in other REST requests so it should get looked at carefully.

Resolves #872

@ponyisi ponyisi added this to the 1.5.2 bug fixes milestone Oct 3, 2024
@ponyisi ponyisi requested a review from BenGalewsky October 3, 2024 15:30
Copy link
Contributor

@BenGalewsky BenGalewsky left a comment

Choose a reason for hiding this comment

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

The tests all pass, I guess all we can do is try it and see!

@BenGalewsky BenGalewsky merged commit 3b4008e into develop Oct 8, 2024
75 checks passed
@BenGalewsky BenGalewsky deleted the flask-rest-errors branch October 8, 2024 13:29
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.

Certain auth errors raise 500 not 401
2 participants