From 039f1a522ef095848ad966951fb4829a3b0b7281 Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Sun, 21 Nov 2021 07:25:36 -0600 Subject: [PATCH] log error messages on vod endpoints --- frigate/http.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frigate/http.py b/frigate/http.py index eda33c4ca..aceb5f6ae 100644 --- a/frigate/http.py +++ b/frigate/http.py @@ -666,6 +666,7 @@ def vod_ts(camera, start_ts, end_ts): logger.warning(f"Recording clip is missing or empty: {recording.path}") if not clips: + logger.error("No recordings found for the requested time range") return "No recordings found.", 404 hour_ago = datetime.now() - timedelta(hours=1) @@ -694,10 +695,12 @@ def vod_event(id): try: event: Event = Event.get(Event.id == id) except DoesNotExist: + logger.error(f"Event not found: {id}") return "Event not found.", 404 if not event.has_clip: - return "Clip not available", 404 + logger.error(f"Event does not have recordings: {id}") + return "Recordings not available", 404 clip_path = os.path.join(CLIPS_DIR, f"{event.camera}-{id}.mp4")