@devries-cameron20 / composio Mirror · read-only / commits / 99a3e998d
Fork 0

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 22, 05:45 UTC

refactor(cli): use typed error check instead of re-inspecting slug for no-connection tips

Replace isNoConnectionSlug(slugValue) with instanceof ActionExecuteConnectedAccountNotFoundError — the executor already classifies these errors, so the command trusts the typed error instead of double-checking the slug.

jkomyno committed Feb 26, 2026 at 01:56 UTC 99a3e998d0de97ffb6811e75401494780291721d
1 file changed +4 -3
ts/packages/cli/src/commands/tools/commands/tools.execute.cmd.ts
+4 -3
@@ -9,7 +9,6 @@ import { requireAuth } from 'src/effects/require-auth';
9 import { TerminalUI } from 'src/services/terminal-ui';
10 import {
11 ActionExecuteConnectedAccountNotFoundError,
12 - isNoConnectionSlug,
12 ToolsExecutor,
13 } from 'src/services/tools-executor';
14 import type { ToolExecuteParams } from 'src/services/tools-executor';
@@ -210,8 +209,10 @@ const handleExecutionError = (
209 yield* ui.note(formatUnknownObject(redactRequestId(detailsObject)), 'Error details');
210 }
211
213 - // No-connection tips — show for both legacy and Tool Router error slugs
214 - if (isNoConnectionSlug(slugValue)) {
212 + // No-connection tips — the executor already classifies these into
213 + // ActionExecuteConnectedAccountNotFoundError, so check the typed error
214 + // instead of re-inspecting the slug.
215 + if (normalized instanceof ActionExecuteConnectedAccountNotFoundError) {
216 yield* ui.note(connectionTips(context.toolSlug, context.userId), 'Tips');
217 }
218