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

Allow default Errorhandler for HTTPException #2144

Closed
wants to merge 1 commit into from
Closed

Allow default Errorhandler for HTTPException #2144

wants to merge 1 commit into from

Conversation

sumpfgottheit
Copy link
Contributor

Allow an default errorhandler for all HTTPException.

This will come handy when building a REST API where you want all Errors return JSON instead of the default behaviour.

PR #2082 solves the same problem, but it didn't work in my environment. Tests are included.

Allow a default errorhandler by registering
an errorhandler for HTTPException

tests included
cerickson added a commit to cerickson/flask that referenced this pull request May 22, 2017
Error handlers are now returned in order of blueprint:code, app:code,
blueprint:HTTPException, app:HTTPException, None

Corresponding tests also added.

Ref issue pallets#941, pr pallets#1383, pallets#2082, pallets#2144
@jeffwidman
Copy link
Contributor

Thanks for this! Closing in favor of the #2304 which takes this and extends it.

@jeffwidman jeffwidman closed this May 23, 2017
cerickson added a commit to cerickson/flask that referenced this pull request May 23, 2017
Error handlers are now returned in order of blueprint:code, app:code,
blueprint:HTTPException, app:HTTPException, None

Corresponding tests also added.

Ref issue pallets#941, pr pallets#1383, pallets#2082, pallets#2144
cerickson added a commit to cerickson/flask that referenced this pull request May 23, 2017
Error handlers are now returned in order of blueprint:code, app:code,
blueprint:HTTPException, app:HTTPException, None

Corresponding tests also added.

Ref issue pallets#941, pr pallets#1383, pallets#2082, pallets#2144
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants