This commit is contained in:
Josh Hawkins 2026-03-02 08:13:08 -06:00
parent 126e708c4c
commit 2ddb111ea3
2 changed files with 16 additions and 6 deletions

View File

@ -77,14 +77,22 @@ async def start_debug_replay(request: Request, body: DebugReplayStartBody):
frigate_config=request.app.frigate_config, frigate_config=request.app.frigate_config,
config_publisher=request.app.config_publisher, config_publisher=request.app.config_publisher,
) )
except ValueError as e: except ValueError:
logger.exception("Invalid parameters for debug replay start request")
return JSONResponse( return JSONResponse(
content={"success": False, "message": str(e)}, content={
"success": False,
"message": "Invalid debug replay request parameters",
},
status_code=400, status_code=400,
) )
except RuntimeError as e: except RuntimeError:
logger.exception("Error while starting debug replay session")
return JSONResponse( return JSONResponse(
content={"success": False, "message": str(e)}, content={
"success": False,
"message": "An internal error occurred while starting debug replay",
},
status_code=500, status_code=500,
) )
@ -158,7 +166,10 @@ async def stop_debug_replay(request: Request):
except (ValueError, RuntimeError, OSError) as e: except (ValueError, RuntimeError, OSError) as e:
logger.error("Error stopping replay: %s", e) logger.error("Error stopping replay: %s", e)
return JSONResponse( return JSONResponse(
content={"success": False, "message": str(e)}, content={
"success": False,
"message": "Failed to stop replay session due to an internal error.",
},
status_code=500, status_code=500,
) )

View File

@ -86,7 +86,6 @@ class TimelineProcessor(threading.Thread):
event_data: dict[Any, Any], event_data: dict[Any, Any],
) -> bool: ) -> bool:
"""Handle object detection.""" """Handle object detection."""
save = False
camera_config = self.config.cameras.get(camera) camera_config = self.config.cameras.get(camera)
if camera_config is None: if camera_config is None:
return False return False