Skip to content

Commit

Permalink
Only log if it's a 500
Browse files Browse the repository at this point in the history
  • Loading branch information
dannon committed Apr 23, 2024
1 parent de65f4c commit 857e4a4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/galaxy/webapps/base/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,8 @@ async def message_exception_middleware(request: Request, exc: MessageException)
# Intentionally not logging traceback here as the full context will be
# dispatched to Sentry if configured. This just makes logs less opaque
# when one sees a 500.
log.info(f"MessageException: {exc}")
if exc.status_code >= 500:
log.info(f"MessageException: {exc}")
return get_error_response_for_request(request, exc)


Expand Down

0 comments on commit 857e4a4

Please sign in to comment.