feat: enhance error handling with custom HTTP exception responses and middleware improvements

This commit is contained in:
2026-02-16 13:18:42 -06:00
parent ffc82ea82b
commit e6ef5c9094
4 changed files with 56 additions and 24 deletions

View File

@@ -18,5 +18,10 @@ class UserContextMiddleware(BaseHTTPMiddleware):
# Log error or ignore
pass
response = await call_next(request)
try:
response = await call_next(request)
except Exception:
# Re-raise the exception to let other middleware and handlers deal with it
raise
return response