From a3ff27864059845a9f7543f45ec6ba9e2e85d918 Mon Sep 17 00:00:00 2001 From: Eric Gustin <34000337+EricGustin@users.noreply.github.com> Date: Thu, 10 Apr 2025 10:39:33 -0800 Subject: [PATCH] Increase httpx timeout for a Notion Tool (#358) Increasing this helps with large pages --- toolkits/notion/arcade_notion_toolkit/tools/search.py | 3 ++- toolkits/notion/pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/toolkits/notion/arcade_notion_toolkit/tools/search.py b/toolkits/notion/arcade_notion_toolkit/tools/search.py index a5165cf5..8d74ae54 100644 --- a/toolkits/notion/arcade_notion_toolkit/tools/search.py +++ b/toolkits/notion/arcade_notion_toolkit/tools/search.py @@ -146,8 +146,9 @@ async def get_object_metadata( async def get_metadata_by_id(object_id: str) -> dict[str, Any]: url = get_url("retrieve_a_page", page_id=object_id) headers = get_headers(context) - async with httpx.AsyncClient() as client: + async with httpx.AsyncClient(timeout=10) as client: response = await client.get(url, headers=headers) + if response.status_code != 200: raise ToolExecutionError( message="The page or database could not be found.", diff --git a/toolkits/notion/pyproject.toml b/toolkits/notion/pyproject.toml index e51715d9..87d98c72 100644 --- a/toolkits/notion/pyproject.toml +++ b/toolkits/notion/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "arcade_notion_toolkit" -version = "0.1.1" +version = "0.1.2" description = "Arcade.dev LLM tools for Notion" authors = ["ArcadeAI "]