Skip to content
Myr

docs "Returning API Errors as JSON" return correct status code

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by LarsMoons · committed by David Lord · parent b9729a0 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:docs/errorhandling.rst+1 added-1 removed
487 unmodified lines
488 return rv489490 @app.errorhandler(InvalidAPIUsage)491 def invalid_api_usage(e):492 return jsonify(e.to_dict())492 return jsonify(e.to_dict()), e.status_code493494 # an API app route for getting user information495 # a correct request might be /api/user?user_id=420496 @app.route("/api/user")
28 unmodified lines