From a862201a84433c41ce49e8fb0c6907c73198e89d Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Wed, 17 Apr 2024 19:12:40 -0700 Subject: [PATCH] fix(utils.py): exception mapping grpc none unknown error to api error --- litellm/utils.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/litellm/utils.py b/litellm/utils.py index 2ae1467d0..5bc143927 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -7842,6 +7842,15 @@ def exception_type( llm_provider="vertex_ai", response=original_exception.response, ) + elif "None Unknown Error." in error_str: + exception_mapping_worked = True + raise APIError( + message=f"VertexAIException - {error_str}", + status_code=500, + model=model, + llm_provider="vertex_ai", + request=original_exception.request, + ) elif "403" in error_str: exception_mapping_worked = True raise BadRequestError(