test: handle service unavailable error

This commit is contained in:
Krrish Dholakia 2024-11-14 18:13:56 +05:30
parent 51ec270501
commit 8bf0f57b59

View file

@ -3333,7 +3333,7 @@ async def test_acompletion_function_call_with_streaming(model):
validate_final_streaming_function_calling_chunk(chunk=chunk)
idx += 1
# raise Exception("it worked! ")
except litellm.InternalServerError:
except litellm.InternalServerError or litellm.ServiceUnavailableError:
pass
except Exception as e:
pytest.fail(f"Error occurred: {e}")