output-error-try-catch

Remove try-catch blocks around Output SDK step calls to enforce retry policies.

430|12|Updated Mar 13, 2026
One-click install
npx skills add https://github.com/growthxai/output --skill output-error-try-catch
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: output-error-try-catch
Source: https://github.com/growthxai/output/tree/main/coding_assistants/claude/plugins/outputai/skills/output-error-try-catch
Command: npx skills add https://github.com/growthxai/output --skill output-error-try-catch

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Identify and fix the common anti-pattern of wrapping step calls in try-catch blocks that swallow errors and disable Output SDK retry logic.

Core Features & Use Cases

  • Detects try-catch blocks around steps and flags where retries won't trigger.
  • Guides removing try-catch and applying per-step retry policies.
  • Shows safe patterns for optional fallbacks without bypassing retries.

Quick Start

Remove try-catch blocks around step calls and rely on configured retry policies to handle failures.

Frequently Asked Questions about output-error-try-catch

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why are retries not triggering in my TypeScript workflow?

Retries fail when step calls are wrapped in try-catch blocks that swallow errors and disable the Output SDK retry logic. Removing these catch blocks restores the configured retry policies for each step.

How do I fix try-catch anti-patterns in Output SDK workflows?

Fix try-catch anti-patterns by removing catch blocks around step calls and relying on per-step retry policies. This preserves error context and ensures the Output SDK triggers retries automatically on failure.

Can I use optional fallbacks without bypassing retries in TypeScript?

Yes, safe fallback patterns exist that provide optional values without bypassing retries. Instead of swallowing exceptions with try-catch, apply per-step retry policies to handle failures while preserving error context.

Does removing catch blocks lose error context in an SDK workflow?

No, removing catch blocks preserves error context rather than losing it. The Output SDK captures the original error details and applies the configured per-step retry policies to ensure failures are retried correctly.

When should I not use try-catch around step calls?

Avoid try-catch around step calls when you rely on Output SDK retry logic. If errors are swallowed or misclassified by the catch block, retries will not trigger, making try-catch an anti-pattern for standard step execution.