mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
Check for jpg bytes before make_response
If jpg_bytes wasn't retrieved from either desk or a tracked object, respond with 404 Prevents uncaught error for unknown event ids sent to event_snapshot endpoint
This commit is contained in:
parent
7ddba4fc59
commit
20912c12e7
@ -214,6 +214,9 @@ def event_snapshot(id):
|
||||
except:
|
||||
return "Event not found", 404
|
||||
|
||||
if jpg_bytes is None:
|
||||
return "Event not found", 404
|
||||
|
||||
response = make_response(jpg_bytes)
|
||||
response.headers["Content-Type"] = "image/jpg"
|
||||
return response
|
||||
|
Loading…
Reference in New Issue
Block a user