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 May 1, 2024
1 parent f4b87ac commit 5540e95
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 @@ -201,7 +201,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 5540e95

Please sign in to comment.