Skip to content

Commit

Permalink
#125 - use non-decorator version of error handler registerer
Browse files Browse the repository at this point in the history
  • Loading branch information
louise-davies committed Jun 12, 2020
1 parent 755e85f commit 54e50ce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,13 @@
api = Api(app)


@app.errorhandler(ApiError)
def handle_error(e):
return str(e), e.status_code


app.register_error_handler(ApiError, handle_error)


swaggerui_blueprint = get_swaggerui_blueprint(
"",
"/openapi.json",
Expand Down

0 comments on commit 54e50ce

Please sign in to comment.