From 2a7ed84a23d337f0ae4a0ebb4f0e7ef45bf30b4d Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Thu, 1 Aug 2024 15:15:45 -0700 Subject: [PATCH] fix(databricks.py): fix error handling --- litellm/llms/databricks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/llms/databricks.py b/litellm/llms/databricks.py index 0567e6e05..0c5509a71 100644 --- a/litellm/llms/databricks.py +++ b/litellm/llms/databricks.py @@ -333,7 +333,7 @@ class DatabricksChatCompletion(BaseLLM): except httpx.HTTPStatusError as e: raise DatabricksError( status_code=e.response.status_code, - message=response.text if response else str(e), + message=e.response.text, ) except httpx.TimeoutException as e: raise DatabricksError(status_code=408, message="Timeout error occurred.")