From 21557790d962a68de22466fc77daf97c84b45cd7 Mon Sep 17 00:00:00 2001 From: Aaron Nelson Date: Wed, 29 Apr 2026 17:04:56 +0000 Subject: [PATCH] capture: return error_type on transcription failure instead of HTTP 500 --- scripts/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/api.py b/scripts/api.py index 10a76a8..7c7c434 100644 --- a/scripts/api.py +++ b/scripts/api.py @@ -861,7 +861,7 @@ Keep the full description to 150-250 words. Do not speculate beyond what is visi except Exception as e: if tmp_path and os.path.exists(tmp_path): os.unlink(tmp_path) - raise HTTPException(status_code=500, detail=str(e)) + return JSONResponse({"ok": False, "error": str(e), "error_type": "transcription_failed"}) else: raise HTTPException(status_code=400, detail="No audio or image provided")