fix: update userId in executeAction to a static value and improve error logging

- Changed userId from connectedAccountId to a static value 'rowboat-user'.
- Enhanced error logging to include detailed error information in JSON format.
This commit is contained in:
tusharmagar 2026-02-18 13:23:22 +05:30
parent 728857da1d
commit f22087cbc3

View file

@ -343,7 +343,7 @@ export async function executeAction(
try {
const client = getComposioClient();
const result = await client.tools.execute(actionSlug, {
userId: connectedAccountId,
userId: 'rowboat-user',
arguments: input,
connectedAccountId,
dangerouslySkipVersionCheck: true,
@ -352,8 +352,8 @@ export async function executeAction(
console.log(`[Composio] Action completed successfully`);
return { success: true, data: result.data };
} catch (error) {
console.error(`[Composio] Action execution failed:`, error);
const message = error instanceof Error ? error.message : 'Unknown error';
console.error(`[Composio] Action execution failed:`, JSON.stringify(error, Object.getOwnPropertyNames(error ?? {}), 2));
const message = error instanceof Error ? error.message : (typeof error === 'object' ? JSON.stringify(error) : 'Unknown error');
return { success: false, data: null, error: message };
}
}