From 2fe85084ba95cc96fc8669539a294fece1fa09cc Mon Sep 17 00:00:00 2001 From: Nick Mowen Date: Mon, 5 Dec 2022 22:00:47 -0700 Subject: [PATCH] Update errors --- frigate/http.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frigate/http.py b/frigate/http.py index 3ce9586e1..1ad82f56b 100644 --- a/frigate/http.py +++ b/frigate/http.py @@ -7,6 +7,7 @@ import json import os import subprocess as sp import time +import traceback from functools import reduce from pathlib import Path from urllib.parse import unquote @@ -627,7 +628,6 @@ def config_raw(): @bp.route("/config/save", methods=["POST"]) def config_save(): new_config = request.get_data().decode() - logging.error(f"The data is {new_config}") if not new_config: return "Config with body param is required", 400 @@ -637,7 +637,9 @@ def config_save(): restart_frigate() return "Config successfully saved", 200 except Exception as e: - return f"Schema error: {e}", 400 + return make_response( + jsonify({"success": False, "message": str(traceback.format_exc())}), 400 + ) @bp.route("/config/schema")