Add 405 error

This commit is contained in:
Son NK 2020-05-13 23:28:00 +02:00
parent 5c8c741a6a
commit ee19957d5d
1 changed files with 5 additions and 0 deletions

View File

@ -44,3 +44,8 @@ def not_found(e):
def internal_error(e):
LOG.exception(e)
return jsonify(error="Internal error"), 500
@api_bp.app_errorhandler(405)
def wrong_method(e):
return jsonify(error="Method not allowed"), 405