diff --git a/impl/astra_vector.py b/impl/astra_vector.py index 28a7795..8b73fe7 100644 --- a/impl/astra_vector.py +++ b/impl/astra_vector.py @@ -308,6 +308,12 @@ def handle_response_errors(self, response: requests.Response) -> HandledResponse detail=f"{TOKEN_AUTH_FAILURE_MESSAGE}\nCould not access url: {e.response.url}. Detail: {e.response.text}", retryable=False, ) + if e.response.status_code == 409: + return HandledResponse( + status_code=409, + detail="Conflict", + retryable=True, + ) try: response_dict = response.json() except json.JSONDecodeError: @@ -436,7 +442,6 @@ async def make_keyspace(self): # Make the POST request asynchronously async with httpx.AsyncClient() as client: response = await client.post(url, headers=headers, json=payload) - handled_response = self.handle_response_errors(response) if handled_response is not None: if handled_response.retryable: