forked from orbit-oss/flask
Merge pull request #3880 from elliott-king/patch-2
Docs update: clarify json error handling
This commit is contained in:
commit
d887d32f4d
1 changed files with 1 additions and 1 deletions
|
|
@ -270,7 +270,7 @@ at the application level using the ``request`` proxy object::
|
|||
@app.errorhandler(405)
|
||||
def _handle_api_error(ex):
|
||||
if request.path.startswith('/api/'):
|
||||
return jsonify_error(ex)
|
||||
return jsonify(error=str(ex)), ex.code
|
||||
else:
|
||||
return ex
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue