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

Drop support for flask 0.x and register default error handler only for HTTPException #12

Merged
merged 2 commits into from
Oct 1, 2018

Conversation

lafrech
Copy link
Member

@lafrech lafrech commented Oct 1, 2018

Since Flask 1.0, it is now possible to register a error handler for generic HTTPException (pallets/flask#941, pallets/flask#2314).

Because this is not possible with Flask 0.x, the error handler is registered for all error codes as a workaround, which can mess with other extensions registering error handlers if flask-rest-api is initiated last.

This PR addresses this by only registering the error handler for HTTPException and dropping support for Flask 0.x. Now other extensions may register error handlers for specific exceptions or codes.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.0007%) to 99.625% when pulling 5d22e5c on dev_drop_flask_0.x into d42641a on master.

@lafrech lafrech merged commit a62c639 into master Oct 1, 2018
@lafrech lafrech deleted the dev_drop_flask_0.x branch October 1, 2018 20:01
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