From 5fdfafd57f1032a2a3ec75380d11fd26ccc5d70b Mon Sep 17 00:00:00 2001 From: tronikos Date: Fri, 7 Jun 2024 23:51:42 -0700 Subject: [PATCH] Catch GoogleAPICallError in Google Generative AI (#119118) --- .../components/google_generative_ai_conversation/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/google_generative_ai_conversation/__init__.py b/homeassistant/components/google_generative_ai_conversation/__init__.py index 523198355d1..f115f3923b6 100644 --- a/homeassistant/components/google_generative_ai_conversation/__init__.py +++ b/homeassistant/components/google_generative_ai_conversation/__init__.py @@ -71,7 +71,7 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: try: response = await model.generate_content_async(prompt_parts) except ( - ClientError, + GoogleAPICallError, ValueError, genai_types.BlockedPromptException, genai_types.StopCandidateException,