Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
refactor(cli): replace listen create_trigger error explicitly on unknown slugs
jkomyno committed
Sep 15, 2026 at 12:55 UTC
f05fbf6323c6819db27c59238a9140754b844798
1 file changed
+5
-2
ts/packages/cli/src/commands/listen.cmd.ts
+5
-2
@@ -552,8 +552,11 @@ export const listenCmd = Command.make(
552
}).pipe(
553
// An active account for the inferred toolkit skips the lookup in
554
// resolveConnectedAccountIdForTrigger, so a mistyped slug with a valid toolkit prefix
555
- // only surfaces here.
556
- Effect.tapError(() => assertTriggerTypeExists({ client, slug }))
555
+ // only surfaces here. The lookup's unknown_trigger failure replaces the create_trigger
556
+ // error; any other outcome re-fails with the original error.
557
+ Effect.catch(error =>
558
+ assertTriggerTypeExists({ client, slug }).pipe(Effect.andThen(Effect.fail(error)))
559
+ )
560
),
561
createdTrigger =>
562
Effect.gen(function* () {