mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-26 19:06:11 +01:00
log error messages on vod endpoints
This commit is contained in:
parent
24e2f84231
commit
039f1a522e
@ -666,6 +666,7 @@ def vod_ts(camera, start_ts, end_ts):
|
|||||||
logger.warning(f"Recording clip is missing or empty: {recording.path}")
|
logger.warning(f"Recording clip is missing or empty: {recording.path}")
|
||||||
|
|
||||||
if not clips:
|
if not clips:
|
||||||
|
logger.error("No recordings found for the requested time range")
|
||||||
return "No recordings found.", 404
|
return "No recordings found.", 404
|
||||||
|
|
||||||
hour_ago = datetime.now() - timedelta(hours=1)
|
hour_ago = datetime.now() - timedelta(hours=1)
|
||||||
@ -694,10 +695,12 @@ def vod_event(id):
|
|||||||
try:
|
try:
|
||||||
event: Event = Event.get(Event.id == id)
|
event: Event = Event.get(Event.id == id)
|
||||||
except DoesNotExist:
|
except DoesNotExist:
|
||||||
|
logger.error(f"Event not found: {id}")
|
||||||
return "Event not found.", 404
|
return "Event not found.", 404
|
||||||
|
|
||||||
if not event.has_clip:
|
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")
|
clip_path = os.path.join(CLIPS_DIR, f"{event.camera}-{id}.mp4")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user