NVR with realtime local object detection for IP cameras
TypeScript aicameragoogle-coralhome-assistanthome-automationhomeautomationmqttnvrobject-detectionrealtimertsptensorflow
Fix webUI success / error messages (#7820)
Nicolas Mowenb9e6afa65967
diff --git a/frigate/http.py b/frigate/http.pyindex ed47c86611..d26a7bd2a4 100644--- a/frigate/http.py+++ b/frigate/http.py@@ -1646,7 +1646,12 @@ def export_recording(camera_name: str, start_time, end_time):)if recordings_count <= 0:- return "No recordings found for time range", 400+ return make_response(+ jsonify(+ {"success": False, "message": "No recordings found for time range"}+ ),+ 400,+ )exporter = RecordingExporter(current_app.frigate_config,diff --git a/web/src/routes/Config.jsx b/web/src/routes/Config.jsxindex e043bbf281..b858361296 100644--- a/web/src/routes/Config.jsx+++ b/web/src/routes/Config.jsx@@ -28,10 +28,13 @@ export default function Config() {}).then((response) => {if (response.status === 200) {+ setError('');setSuccess(response.data);}}).catch((error) => {+ setSuccess('');+if (error.response) {setError(error.response.data.message);} else {diff --git a/web/src/routes/Export.jsx b/web/src/routes/Export.jsxindex 1cac3c844a..7156a1b0e8 100644--- a/web/src/routes/Export.jsx+++ b/web/src/routes/Export.jsx@@ -58,7 +58,7 @@ export default function Export() {}}).catch((error) => {- if (error.response) {+ if (error.response?.data?.message) {setMessage({ text: `Failed to start export: ${error.response.data.message}`, error: true });} else {setMessage({ text: `Failed to start export: ${error.message}`, error: true });