mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
fix(proxy_server.py): fix backoff attempt logging
make sure backoff uses our logging handler to log info to
This commit is contained in:
parent
6cca5612d2
commit
7ddca8d834
2 changed files with 30 additions and 7 deletions
|
@ -2837,3 +2837,17 @@ missing_keys_html_form = """
|
|||
</body>
|
||||
</html>
|
||||
"""
|
||||
|
||||
|
||||
def get_error_message_str(e: Exception) -> str:
|
||||
error_message = ""
|
||||
if isinstance(e, HTTPException):
|
||||
if isinstance(e.detail, str):
|
||||
error_message = e.detail
|
||||
elif isinstance(e.detail, dict):
|
||||
error_message = json.dumps(e.detail)
|
||||
else:
|
||||
error_message = str(e)
|
||||
else:
|
||||
error_message = str(e)
|
||||
return error_message
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue