Skip to content
Snippets Groups Projects
Commit e8253c54 authored by vlorentz's avatar vlorentz
Browse files

RPC server: Do not log exceptions with 4xx HTTP status codes

They are client errors, therefore it does not make sense to log them
as exceptions (which is only useful for debugging the server).
parent c824e4b6
No related branches found
No related tags found
No related merge requests found
......@@ -429,10 +429,9 @@ def error_handler(exception, encoder, status_code=500):
on the client side.
"""
logging.exception(exception)
status_class = status_code // 100
if status_class == 5:
logging.exception(exception)
sentry_sdk.capture_exception(exception)
response = encoder(exception_to_dict(exception))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment