From 215085b3262a7d3c49698d04154bea1f59b17966 Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Thu, 2 Apr 2026 08:30:22 -0500 Subject: [PATCH] fix: let HTTPException pass through @handle_db_errors unchanged The decorator was catching all exceptions including intentional HTTPException (401, 404, etc.) and re-wrapping them as 500 "Database error". This masked auth failures and other deliberate HTTP errors. Co-Authored-By: Claude Opus 4.6 (1M context) --- app/dependencies.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/dependencies.py b/app/dependencies.py index bfab9f1..a6b25fe 100644 --- a/app/dependencies.py +++ b/app/dependencies.py @@ -807,6 +807,10 @@ def handle_db_errors(func): return result + except HTTPException: + # Let intentional HTTP errors (401, 404, etc.) pass through unchanged + raise + except Exception as e: elapsed_time = time.time() - start_time error_trace = traceback.format_exc()