Merge pull request #5244 from BerriAI/litellm_better_error_logging_sentry

refactor: replace .error() with .exception() logging for better debugging on sentry
This commit is contained in:
Krish Dholakia 2024-08-16 19:16:20 -07:00 committed by GitHub
commit a8dd2b6910
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
35 changed files with 242 additions and 253 deletions

View file

@ -1137,9 +1137,9 @@ async def user_api_key_auth(
else:
raise Exception()
except Exception as e:
verbose_proxy_logger.error(
"litellm.proxy.proxy_server.user_api_key_auth(): Exception occured - {}\n{}".format(
str(e), traceback.format_exc()
verbose_proxy_logger.exception(
"litellm.proxy.proxy_server.user_api_key_auth(): Exception occured - {}".format(
str(e)
)
)