diff --git a/litellm/litellm_core_utils/exception_mapping_utils.py b/litellm/litellm_core_utils/exception_mapping_utils.py index 7578019dff..2bfe9c1ca6 100644 --- a/litellm/litellm_core_utils/exception_mapping_utils.py +++ b/litellm/litellm_core_utils/exception_mapping_utils.py @@ -2152,7 +2152,7 @@ def exception_type( # type: ignore # noqa: PLR0915 message=f"APIError: {exception_provider} - {error_str}", llm_provider=custom_llm_provider, model=model, - request=original_exception.request, + request=getattr(original_exception, "request", None), litellm_debug_info=extra_information, ) else: