feat: enhance error handling with custom HTTP exception responses and middleware improvements
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user