now returning bad request when wrong parameters are supplied for room / recorder creation
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
from flask import Blueprint, abort
|
||||
from flask_restx import Api, Namespace
|
||||
from werkzeug.exceptions import InternalServerError
|
||||
|
||||
api_authorizations = {
|
||||
'apikey': {
|
||||
@@ -73,6 +74,19 @@ from .virtual_command_api import *
|
||||
|
||||
# from .group_api import *
|
||||
|
||||
"""
|
||||
@api_v1.errorhandler(InternalServerError)
|
||||
def handle_500(e):
|
||||
original = getattr(e, "original_exception", None)
|
||||
|
||||
if original is None:
|
||||
# direct 500 error, such as abort(500)
|
||||
api_v1.abort(500)
|
||||
|
||||
# wrapped unhandled error
|
||||
#return render_template("500_unhandled.html", e=original), 500
|
||||
api_v1.abort(500)
|
||||
"""
|
||||
|
||||
@api_bp.route('/<path:path>')
|
||||
def catch_all_api(path):
|
||||
|
||||
Reference in New Issue
Block a user