fix(http_handler.py): raise more detailed http status errors

This commit is contained in:
Krrish Dholakia 2024-06-28 15:12:38 -07:00
parent 0001683036
commit c151a1d244
3 changed files with 35 additions and 13 deletions

View file

@ -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: