From c4910d82efd8486690fdfced91531ff949bd23ce Mon Sep 17 00:00:00 2001 From: Holden Date: Wed, 17 Jun 2026 17:16:04 +0000 Subject: [PATCH] fix: treat Frigate 500 'Could not process' as permanent rejection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Frigate returns HTTP 500 with 'Could not process' when its face detector cannot find or embed a face in the uploaded crop — this will never succeed on retry. Previously these were silently logged at DEBUG and retried on every future run. - Surface 500 error details inline (same display path as 400) - Mark 500 + 'could not process' as a permanent rejection so the asset is skipped on future runs instead of retried indefinitely --- winnow/executor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/winnow/executor.py b/winnow/executor.py index b5a3822..1aa9877 100644 --- a/winnow/executor.py +++ b/winnow/executor.py @@ -566,13 +566,14 @@ def upload_to_frigate(jobs: list[dict]) -> None: error_detail = resp.json().get("message", full_body[:100]) except Exception: error_detail = full_body[:100] - if resp.status_code == 400: + if resp.status_code in (400, 500): progress.console.print(f" [dim]{error_detail}[/dim]") else: logger.debug("%s HTTP %s: %s", fname, resp.status_code, error_detail) _is_permanent = ( (resp.status_code == 400 and "face" in full_body.lower()) or resp.status_code == 422 + or (resp.status_code == 500 and "could not process" in full_body.lower()) ) if _is_permanent: asset_id = asset_map.get(fname)