@devries-cameron20 / composio-1 / commits / 3fae46345
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.

fix(cli): stop re-throwing HttpServerError after displaying friendly message

The info command was catching HttpServerError to show a clean error with suggestions, then re-throwing it — which sent it to the generic error box in bin.ts, duplicating the output. Now returns early after displaying the clack-formatted error and tip.

jkomyno committed Feb 18, 2026 at 20:06 UTC 3fae463452113a7a872f1afe256ab52fd00faaec
1 file changed +11 -2
ts/packages/cli/src/commands/toolkits/commands/toolkits.info.cmd.ts
+11 -2
@@ -108,9 +108,10 @@ export const toolkitsCmd$Info = Command.make('info', { slug }, ({ slug }) =>
108
109 const slugValue = slug.value;
110
111 - const toolkit = yield* ui
111 + const toolkitOpt = yield* ui
112 .withSpinner(`Fetching toolkit "${slugValue}"...`, repo.getToolkitDetailed(slugValue))
113 .pipe(
114 + Effect.asSome,
115 Effect.catchTag('services/HttpServerError', (e: HttpServerError) =>
116 Effect.gen(function* () {
117 // Show structured error message and suggested fix from the API
@@ -134,13 +135,21 @@ export const toolkitsCmd$Info = Command.make('info', { slug }, ({ slug }) =>
135 yield* ui.log.step(
136 `Did you mean?\n${suggestionLines}\n\n> composio toolkits info "${suggestions[0]!.slug}"`
137 );
138 + } else {
139 + yield* ui.log.step('Browse available toolkits:\n> composio toolkits list');
140 }
141
139 - return yield* Effect.fail(e);
142 + return Option.none();
143 })
144 )
145 );
146
147 + if (Option.isNone(toolkitOpt)) {
148 + return;
149 + }
150 +
151 + const toolkit = toolkitOpt.value;
152 +
153 yield* ui.note(formatToolkitInfo(toolkit), `Toolkit: ${toolkit.name}`);
154
155 // Next step hint