with one click
error-handling
Capture errors with rich context for debugging and alerting
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Capture errors with rich context for debugging and alerting
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
| name | error-handling |
| description | Capture errors with rich context for debugging and alerting |
| triggers | ["error tracking","exception monitoring","error context","structured errors"] |
| priority | 1 |
An error without context is useless. Every error should answer: What, Where, Who, When, Why.
| Attribute | Example | Required |
|---|---|---|
error.type | ValidationError, TimeoutError | Yes |
error.message | "Invalid email format" | Yes |
exception.stacktrace | Full stack trace | Yes |
job.name | checkout, signup | Recommended |
job.step | payment, validation | Recommended |
| Level | Status | Action |
|---|---|---|
| Critical | 500 | Page immediately |
| Error | 500 | Alert, investigate |
| Warning | 4xx | Track, batch review |
| Info | - | Log only |
AppError {
Type string // "validation", "timeout"
Message string // Human-readable
Code string // For grouping
Retryable bool // Can retry?
Context map // Additional context
}
On error:
→ Record error on span with error.type, job.name, job.step
→ Set span status to Error
→ Log structured error with trace_id
→ Increment error counter by type/job/step
Group by: error type + message (without dynamic data) + top stack frames
Strip from fingerprints: user IDs, request IDs, timestamps, tokens
references/methodology/jtbd-for-backend.mdreferences/anti-patterns.mdTrack cache hit rates, latency, and detect cache-related issues
Instrument database queries, connection pools, and detect N+1 queries
Implement liveness, readiness, and dependency health checks
Plan backend observability using RED + USE + 4 Golden Signals + JTBD
Monitor message queues, job processing, and detect backpressure
Instrument HTTP/gRPC endpoints with distributed tracing and RED metrics