Skip to content

Commit

Permalink
feat: add error codes to composio errors (#2290)
Browse files Browse the repository at this point in the history
Co-authored-by: Shubham Naik <[email protected]>
  • Loading branch information
4shub and Shubham Naik authored Dec 20, 2024
1 parent 108a460 commit 47faa11
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions letta/server/rest_api/routers/v1/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
Expand All @@ -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,
},
Expand Down

0 comments on commit 47faa11

Please sign in to comment.