Skip to content

Fix namespace error handlers when propagate_exceptions=True #286

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
Apr 14, 2021

Conversation

mjreiss
Copy link
Contributor

@mjreiss mjreiss commented Feb 20, 2021

Fixes issue #285.

When an errorhandler is registered on a namespace, and PROPAGATE_EXCEPTIONS is set to True in the Flask app, then the namespace handler will not catch the exceptions. It looks like this is due to the handle_error function not checking the error handlers that exist in any child classes.

@mjreiss mjreiss marked this pull request as ready for review February 20, 2021 21:39
@codecov
Copy link

codecov bot commented Feb 20, 2021

Codecov Report

Merging #286 (314458e) into master (41b3b59) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #286   +/-   ##
=======================================
  Coverage   96.86%   96.86%           
=======================================
  Files          19       19           
  Lines        2712     2712           
=======================================
  Hits         2627     2627           
  Misses         85       85           
Impacted Files Coverage Δ
flask_restx/api.py 96.69% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 41b3b59...614ab91. Read the comment docs.

@j5awry j5awry merged commit cb19760 into python-restx:master Apr 14, 2021
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