From 47faa11f59cbc009513d4b56a2664bd69d5c7e7f Mon Sep 17 00:00:00 2001 From: Shubham Naik Date: Fri, 20 Dec 2024 15:40:33 -0800 Subject: [PATCH] feat: add error codes to composio errors (#2290) Co-authored-by: Shubham Naik --- letta/server/rest_api/routers/v1/tools.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/letta/server/rest_api/routers/v1/tools.py b/letta/server/rest_api/routers/v1/tools.py index 500e6fc86e..d1287bc8b4 100644 --- a/letta/server/rest_api/routers/v1/tools.py +++ b/letta/server/rest_api/routers/v1/tools.py @@ -243,6 +243,7 @@ def add_composio_tool( raise HTTPException( status_code=400, # Bad Request detail={ + "code": "EnumStringNotFound", "message": f"Cannot find composio action with name `{composio_action_name}`.", "composio_action_name": composio_action_name, }, @@ -251,6 +252,7 @@ def add_composio_tool( raise HTTPException( status_code=400, # Bad Request detail={ + "code": "ComposioSDKError", "message": f"No connected account found for tool `{composio_action_name}`. You need to connect the relevant app in Composio order to use the tool.", "composio_action_name": composio_action_name, },