error-handling-patterns
Implement Reliable Error Handling
Unclear error handling makes applications hard to debug and recover. This skill provides language-specific patterns for predictable failures, retries, cleanup, and fallback behavior.
Install with my Agent
Copy this request to your Agent. It includes the canonical Skill page and manifest.
Review the Skillstore skill "error-handling-patterns" from https://skillstore.io/skills/wshobson-error-handling-patterns.md and its manifest at https://skillstore.io/api/skills/wshobson-error-handling-patterns/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.Your Agent should still show its plan and request any confirmation required by the security policy.
Agent-readable resources
Use these links when an AI agent, crawler, or script needs clean context instead of reading the full page.
Test it
Using "error-handling-patterns". A user lookup returns null or a database timeout.
Expected outcome:
Not-found results become expected application errors. Database timeouts are wrapped with service context and retried only when safe.
Using "error-handling-patterns". Payment service fails during order processing.
Expected outcome:
Validate order input first. Wrap payment failures with service context. Log once at the boundary. Preserve the original cause.
Using "error-handling-patterns". Batch import validates many rows.
Expected outcome:
Collect row errors, report all actionable failures, and stop only when continuing would corrupt data.
Security Audit
SafeAll static findings were judged false positives. The flagged external command indicators are Markdown fences or TypeScript template strings in documentation, and the network indicators are illustrative HTTP examples. No prompt injection, exfiltration intent, or executable hidden behavior was found.
Risk Factors
โ๏ธ External commands (27)
๐ Network access (2)
Share & cite this report
Share the versioned assessment report, neutral badge, embed card, and citations. Skillstore reports evidence without deciding whether this Skill is safe.
Copy report link
https://skillstore.io/skills/wshobson-error-handling-patterns/audits/9?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdown badge
[](https://skillstore.io/skills/wshobson-error-handling-patterns?utm_source=security_passport_badge)HTML badge
<a href="https://skillstore.io/skills/wshobson-error-handling-patterns?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/wshobson-error-handling-patterns/security.svg" alt="Skillstore security assessment" loading="lazy"></a>Embed card
<iframe src="https://skillstore.io/embed/skills/wshobson-error-handling-patterns.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>Academic citations (APA ยท BibTeX ยท CFF)
APA citation
wshobson. (2026). error-handling-patterns security audit report (audit version 9) [Author version unspecified]. Skillstore. https://skillstore.io/skills/wshobson-error-handling-patterns/audits/9BibTeX citation
@techreport{wshobson-wshobson-error-handling-patterns-2026,
author = {wshobson},
title = {error-handling-patterns security audit report (audit version 9)},
institution = {Skillstore},
year = {2026},
number = {9},
url = {https://skillstore.io/skills/wshobson-error-handling-patterns/audits/9},
note = {Author version unspecified}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "error-handling-patterns security audit report (audit version 9)"
version: "unspecified"
type: report
authors:
- name: "wshobson"
date-released: "2026-07-07"
url: "https://skillstore.io/skills/wshobson-error-handling-patterns/audits/9"
identifiers:
- type: other
value: "skillstore:wshobson-error-handling-patterns:audit:9"
description: "Skillstore immutable audit report identifier"
Compare variants
2 installable variantsEach author remains a separate installable skill. The recommended variant is ranked by Skillstore evidence.
Why this variant is first
sickn33-error-handling-patterns
2026-08-21
wshobson-error-handling-patterns
2026-08-21
Skillstore Score
Why this score Evidence Confidence: HighWhat You Can Build
Design API error contracts
Define typed errors, status codes, and messages before implementing endpoints.
Improve service resilience
Add retries, circuit breakers, and graceful fallbacks around unstable dependencies.
Review error handling quality
Check broad catches, cleanup behavior, and messages during code review.
Try These Prompts
Review this function for error handling gaps. Identify expected errors, unexpected errors, cleanup needs, and user-facing messages.
Help me design a custom exception hierarchy for this service. Include base errors, validation errors, not-found errors, and external-service errors.
Convert this operation to a Result-style flow. Preserve context, avoid swallowed errors, and show where callers should branch.
Design a resilience strategy for this distributed workflow. Include retries, circuit breakers, fallback behavior, logging boundaries, and failure propagation rules.
Best Practices
- Classify errors as expected, recoverable, or unrecoverable before choosing a pattern.
- Preserve original causes and relevant metadata when wrapping errors.
- Place retries, logging, and fallback logic at clear architectural boundaries.
Avoid
- Do not catch broad exceptions without a specific recovery action.
- Do not hide failures by returning null or empty data silently.
- Do not log the same error at every layer before rethrowing it.