mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
fix(http_handler.py): raise more detailed http status errors
This commit is contained in:
parent
0001683036
commit
c151a1d244
3 changed files with 35 additions and 13 deletions
|
@ -5728,7 +5728,10 @@ def exception_type(
|
|||
print() # noqa
|
||||
try:
|
||||
if model:
|
||||
error_str = str(original_exception)
|
||||
if hasattr(original_exception, "message"):
|
||||
error_str = str(original_exception.message)
|
||||
else:
|
||||
error_str = str(original_exception)
|
||||
if isinstance(original_exception, BaseException):
|
||||
exception_type = type(original_exception).__name__
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue