flask: Allow blueprint-local routing for errorhandlers
The comment in flask.Blueprint.errorhandler notes, “Please be aware that routing does not happen local to a blueprint so an error handler for 404 usually is not handled by a blueprint unless it is caused inside a view function.”
Please add Blueprint-local routing for errors triggered by any request to an endpoint defined by a blueprint.
About this issue
- Original URL
- State: closed
- Created 12 years ago
- Comments: 17 (11 by maintainers)
This came up in a recent Stack Overflow question. I mentioned this issue and answered with a workaround that routes to blueprint handlers from the top level handler based on
request.pathandBlueprint.url_prefix.