Skip to content

Commit

Permalink
[API] Log request handling failure exception (#507)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hedingber committed Nov 1, 2020
1 parent 7deb222 commit 5f1c3ab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mlrun/api/main.py
Expand Up @@ -83,7 +83,7 @@ async def log_request_response(request: fastapi.Request, call_next):
)
try:
response = await call_next(request)
except Exception:
except Exception as exc:
logger.warning(
"Request handling failed. Sending response",
# User middleware (like this one) runs after the exception handling middleware, the only thing running after
Expand All @@ -93,6 +93,7 @@ async def log_request_response(request: fastapi.Request, call_next):
request_id=request_id,
uri=path_with_query_string,
method=request.method,
exc=exc,
)
raise
else:
Expand Down

0 comments on commit 5f1c3ab

Please sign in to comment.