Makes the error names consistent
This commit is contained in:
parent
5d20501604
commit
a7f5d60789
1 changed files with 1 additions and 1 deletions
|
|
@ -47,7 +47,7 @@ At that point views can raise that error, but it would immediately result
|
||||||
in an internal server error. The reason for this is that there is no
|
in an internal server error. The reason for this is that there is no
|
||||||
handler registered for this error class. That however is easy to add::
|
handler registered for this error class. That however is easy to add::
|
||||||
|
|
||||||
@app.errorhandler(InvalidAPIUsage)
|
@app.errorhandler(InvalidUsage)
|
||||||
def handle_invalid_usage(error):
|
def handle_invalid_usage(error):
|
||||||
response = jsonify(error.to_dict())
|
response = jsonify(error.to_dict())
|
||||||
response.status_code = error.status_code
|
response.status_code = error.status_code
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue