-
Couldn't load subscription status.
- Fork 341
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Code
Here is sample code where the issue is seen
class GenericError(Exception):
pass
class SomeSpecificError(GenericError):
pass
ns = Namespace("some_route")
@ns.errorhandler(SomeSpecificError)
def handle_specific_error(error):
return {"message": "something specific happened"}, 401
@ns.errorhandler(GenericError)
def handle_generic_error(error):
return {"message": "generic error"}, 401Repro Steps (if applicable)
- raise SomeSpecificError from any route handler
- run this test repeatedly
- Broken!
Expected Behavior
the order in which the error handlers are registered should be taken into account when those are looked up for a given exception
Actual Behavior
Handlers are called in non deterministic order
Environment
- Python version 3.5
- Flask version 1.0.3
- Flask-RESTX version 0.14
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working