From f499e8bb1d5692d1c719f57ae987dfeec13ae7ef Mon Sep 17 00:00:00 2001 From: Jack Collins <6640905+jackmpcollins@users.noreply.github.com> Date: Mon, 13 Nov 2023 21:17:47 -0800 Subject: [PATCH] Add response and body to APIStatus init call --- litellm/exceptions.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/litellm/exceptions.py b/litellm/exceptions.py index d96992d57f..4378bd6766 100644 --- a/litellm/exceptions.py +++ b/litellm/exceptions.py @@ -83,13 +83,15 @@ class ContextWindowExceededError(BadRequestError): # type: ignore ) # Call the base class constructor with the parameters it needs class ServiceUnavailableError(APIStatusError): # type: ignore - def __init__(self, message, llm_provider, model): + def __init__(self, message, llm_provider, model, response: httpx.Response): self.status_code = 503 self.message = message self.llm_provider = llm_provider self.model = model super().__init__( - self.message + self.message, + response=response, + body=None ) # Call the base class constructor with the parameters it needs