Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Fix connectedaccounts flow
haxzie committed
May 15, 2025 at 19:02 UTC
ab7aa8c49dbda096c76cbb3a109c26b1cb414b10
1 file changed
+3
-4
packages/core/src/models/ConnectionRequest.ts
+3
-4
@@ -14,6 +14,7 @@ import {
14
} from '../types/connectedAccounts.types';
15
import { ConnectedAccountRetrieveResponse as OriginalConnectedAccountResponse } from '@composio/client/resources/connected-accounts';
16
import { ZodError } from 'zod';
17
+import logger from '../utils/logger';
18
export class ConnectionRequest {
19
private client: ComposioClient;
20
private connectedAccountId: string;
@@ -24,7 +25,6 @@ export class ConnectionRequest {
25
connectedAccountId: string,
26
connectedAccountStatus: ConnectedAccountStatus
27
) {
27
- console.log('ConnectionRequest constructor', connectedAccountId, connectedAccountStatus);
28
this.client = client;
29
this.connectedAccountId = connectedAccountId;
30
this.connectedAccountStatus = connectedAccountStatus;
@@ -56,11 +56,10 @@ export class ConnectionRequest {
56
});
57
return parsedResponse;
58
} catch (error) {
59
- console.error('Error transforming response', error);
59
+ logger.error('Error transforming response', error);
60
if (error instanceof ZodError) {
61
- console.error(JSON.stringify(error.errors, null, 2));
61
+ logger.error(JSON.stringify(error.errors, null, 2));
62
}
63
- console.error(JSON.stringify(response, null, 2));
63
throw error;
64
}
65
}