Audit and improve web accessibility following WCAG 2.1 guidelines. Use when asked to "improve accessibility", "a11y audit", "WCAG compliance", "screen reader support", "keyboard navigation", or "make accessible".
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Master error handling patterns across languages including exceptions, Result types, error propagation, and graceful degradation to build resilient applications. Use when implementing error handling, designing APIs, or improving application reliability.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
설치 방법 보기설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.
Build resilient applications with robust error handling strategies that gracefully handle failures and provide excellent debugging experiences.
After reading the methodology below, read the reference matching your surface's Languages column in the surface stack map (.claude/instructions/tech-stack.md):
| Language | Reference |
|---|---|
| TypeScript / JavaScript | references/typescript.md |
| Python | references/python.md |
| Go | references/go.md |
| Rust | references/rust.md |
Every language takes a different approach to error handling. Know which philosophy your language uses and follow its idioms:
| Philosophy | Description | Languages |
|---|---|---|
| Exceptions | Traditional try-catch, disrupts control flow | Python, TypeScript/JS, Java, C# |
| Result Types | Explicit success/failure, functional approach | Rust, Haskell, modern TypeScript |
| Error Returns | Explicit error as return value, requires discipline | Go |
| Option/Maybe Types | For nullable values without exceptions | Rust, Haskell, Swift |
| Panics/Crashes | Unrecoverable errors, programming bugs | Rust (panic), Go (panic), Python (SystemExit) |
When to Use Each:
Recoverable Errors — the application can handle and continue:
Unrecoverable Errors — the application should crash and restart:
Prevent cascading failures in distributed systems. When a downstream service fails repeatedly, stop calling it temporarily to let it recover.
State machine:
CLOSED → (failures ≥ threshold) → OPEN
OPEN → (timeout elapsed) → HALF_OPEN
HALF_OPEN → (success ≥ threshold) → CLOSED
HALF_OPEN → (any failure) → OPEN
Parameters:
failure_threshold — how many failures before opening the circuit (e.g., 5)timeout — how long to stay open before trying again (e.g., 60s)success_threshold — how many successes in HALF_OPEN before closing (e.g., 2)See language-specific references for implementation examples.
Collect multiple errors instead of failing on first error. Essential for form validation, batch processing, and multi-field input.
The pattern:
See language-specific references for implementation examples.
Provide fallback functionality when errors occur. The system continues operating with reduced capability rather than failing completely.
Strategies:
See language-specific references for implementation examples.
Automatically retry failed operations with increasing delays between attempts.
Parameters:
max_attempts — maximum retry count (e.g., 3)backoff_factor — multiplier for delay between attempts (e.g., 2.0)retryable_exceptions — which errors are worth retrying (network, timeout — NOT validation)Delay formula: delay = backoff_factor ^ attempt (1s, 2s, 4s, 8s, ...)
See language-specific references for implementation examples.
except Exception / catch (e) hides bugsThis interview is mandatory for every project. All 5 decisions below must be confirmed before proceeding to Data Strategy. Do not skip or defer any decision — this is a hard gate.
Every error response from any surface must conform to this canonical 4-field structure:
| Field | Description |
|---|---|
code | Machine-readable error code (e.g., VALIDATION_FAILED, NOT_FOUND). Clients switch on this field. |
message | Human-readable explanation of what went wrong. Safe to display to end users. |
requestId | Unique identifier for the request that caused the error. Used for support and debugging. |
details | object | null. Structured additional context (e.g., field-level validation errors) or null when no extra detail applies. |
Locked JSON example:
{
"code": "VALIDATION_FAILED",
"message": "Email address is not valid.",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"details": { "field": "email", "reason": "must contain @" }
}
All four top-level fields are always present in every error response.
Rule: No other top-level fields (status, error, timestamp) may appear in the error envelope. HTTP status codes are conveyed via the HTTP response status line, not inside the body.
For each layer in the stack (database → service layer → API handler → transport → client), define: what errors are caught, what is logged (and at what level), and what is exposed to the next layer.
Rule: No layer may expose raw upstream errors to the client. Every layer must catch, wrap, and translate errors before passing them upward.
Define the process-level catch mechanism:
process.on('uncaughtException'), global error middleware, panic recovery).Define per-surface behavior when the backend is unreachable or returns an error:
Define per-surface error boundary placement and behavior:
Present these three questions to the user for confirmation:
Write completed decisions to architecture-draft.md under ## Error Architecture with five sub-sections matching the five decisions above:
### Global Error Envelope### Error Propagation Chain### Unhandled Exception Strategy### Client Fallback Contract### Error Boundary Strategy아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.
로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.
아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.
Audit and improve web accessibility following WCAG 2.1 guidelines. Use when asked to "improve accessibility", "a11y audit", "WCAG compliance", "screen reader support", "keyboard navigation", or "make accessible".
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Structured methodology for adversarial thinking — generating attack scenarios, abuse cases, race conditions, and security edge cases against specs and implementations. Produces spec-level gap items, not code-level fixes.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Orchestrate multiple Antigravity skills through guided workflows for SaaS MVP delivery, security audits, AI agent builds, and browser QA.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Master REST and GraphQL API design principles to build intuitive, scalable, and maintainable APIs that delight developers. Use when designing new APIs, reviewing API specifications, or establishing API design standards.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Manage API versioning and evolution with URL/header/query strategies, deprecation workflows, breaking change classification, sunset headers, and consumer-driven contract testing. Use when designing versioning strategy, deprecating endpoints, or evolving API contracts.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Analyzes codebase structure, data flow, module relationships, and key patterns to generate and maintain a living architecture document (ARCHITECTURE.md).
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.