Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Mirrored from https://github.com/Camo67/composio.git
Synced Nov 23, 03:00 UTC
Add error handling
haxzie committed
May 16, 2025 at 17:14 UTC
7b03c1488421ef89a9801c6c4ef13f4b2e253e75
5 files changed
+3
-5
packages/core/src/errors/ToolErrors.ts
-1
@@ -1,5 +1,4 @@
1
import { ComposioError } from './ComposioError';
2
-import { ComposioError as ComposioClientError } from '@composio/client';
2
3
export const ToolErrorCodes = {
4
TOOLSET_NOT_DEFINED: 'TOOLSET_NOT_DEFINED',
packages/core/src/errors/ValidationError.ts
-1
@@ -2,7 +2,6 @@
2
3
import { ZodError } from 'zod';
4
import { ComposioError } from './ComposioError';
5
-import { error } from 'console';
5
6
/**
7
* Represents an input validation error using Zod.
packages/core/src/models/AuthConfigs.ts
+1
-2
@@ -5,7 +5,7 @@
5
* @date 2025-05-05
6
* @module AuthConfigs
7
*/
8
-import ComposioClient, { ComposioError } from '@composio/client';
8
+import ComposioClient from '@composio/client';
9
import {
10
AuthConfigRetrieveResponse as ComposioAuthConfigRetrieveResponse,
11
AuthConfigDeleteResponse,
@@ -25,7 +25,6 @@ import {
25
CreateAuthConfigResponse,
26
CreateAuthConfigResponseSchema,
27
} from '../types/authConfigs.types';
28
-import { ZodError } from 'zod';
28
import { ValidationError } from '../errors/ValidationError';
29
30
/**
packages/core/src/models/CustomTools.ts
+1
@@ -136,6 +136,7 @@ export class CustomTools {
136
} catch (error) {
137
throw new ComposioToolNotFoundError(`Toolkit with slug ${toolkitSlug} not found`, {
138
toolkitSlug,
139
+ error,
140
});
141
}
142
const connectedAccounts = await this.client.connectedAccounts.list({
packages/core/src/models/Toolkits.ts
+1
-1
@@ -1,4 +1,4 @@
1
-import ComposioClient, { ComposioError } from '@composio/client';
1
+import ComposioClient from '@composio/client';
2
import {
3
ToolKitItemSchema,
4
ToolkitListParams,