now returning bad request when wrong parameters are supplied for room / recorder creation

This commit is contained in:
Tobias Kurze
2020-08-05 07:51:13 +02:00
parent dc142bca0c
commit 16e4231807
7 changed files with 129 additions and 15 deletions

View File

@@ -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):