Add handler for 404 errors

develop
Ensar Sarajčić 2018-11-03 18:24:54 +01:00
parent 34c752241d
commit f7a818e050
1 changed files with 1 additions and 0 deletions

View File

@ -91,6 +91,7 @@ def handle_value_error(e):
@api_bp.errorhandler(NotPresentError) @api_bp.errorhandler(NotPresentError)
@api_bp.errorhandler(404)
def handle_not_present_error(e): def handle_not_present_error(e):
return jsonify({'status': 'error', 'message': str(e)}), 404 return jsonify({'status': 'error', 'message': str(e)}), 404