Skip to content

Commit e3c014f

Browse files
LarsMoonsdavidism
LarsMoons
authored andcommitted
docs "Returning API Errors as JSON" return correct status code
1 parent b9729a0 commit e3c014f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/errorhandling.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ This is a simple example:
489489
490490
@app.errorhandler(InvalidAPIUsage)
491491
def invalid_api_usage(e):
492-
return jsonify(e.to_dict())
492+
return jsonify(e.to_dict()), e.status_code
493493
494494
# an API app route for getting user information
495495
# a correct request might be /api/user?user_id=420

0 commit comments

Comments
 (0)