Error — Error Handling & Resilience Reference
Quick-reference skill for error handling patterns, HTTP status codes, retry strategies, and debugging techniques.
When to Use
- - Designing error handling strategy for an application
- Looking up HTTP status codes and their proper usage
- Implementing retry logic with backoff strategies
- Debugging production errors and failure patterns
- Building resilient systems with circuit breakers
Commands
intro
CODEBLOCK0
Overview of error handling — philosophy, types, and design principles.
http
CODEBLOCK1
HTTP status codes — complete reference with proper usage.
patterns
CODEBLOCK2
Error handling patterns — try/catch, Result types, error boundaries.
retry
CODEBLOCK3
Retry strategies — exponential backoff, jitter, circuit breakers.
logging
CODEBLOCK4
Error logging best practices — structured logging, context, severity levels.
messages
CODEBLOCK5
Error message design — user-facing vs developer-facing, i18n, codes.
debug
CODEBLOCK6
Debugging techniques — root cause analysis, bisection, tracing.
checklist
CODEBLOCK7
Error handling checklist for production applications.
help
CODEBLOCK8
version
CODEBLOCK9
Configuration
| Variable | Description |
|---|
| INLINECODE10 | Data directory (default: ~/.error/) |
Powered by BytesAgain | bytesagain.com | hello@bytesagain.com
错误处理与韧性参考手册
错误处理模式、HTTP状态码、重试策略及调试技术的快速参考技能。
使用场景
- - 为应用程序设计错误处理策略
- 查询HTTP状态码及其正确用法
- 实现带退避策略的重试逻辑
- 调试生产环境错误与故障模式
- 使用断路器构建弹性系统
命令
intro
bash
scripts/script.sh intro
错误处理概述——理念、类型与设计原则。
http
bash
scripts/script.sh http
HTTP状态码——完整参考及正确用法。
patterns
bash
scripts/script.sh patterns
错误处理模式——try/catch、Result类型、错误边界。
retry
bash
scripts/script.sh retry
重试策略——指数退避、抖动、断路器。
logging
bash
scripts/script.sh logging
错误日志最佳实践——结构化日志、上下文、严重级别。
messages
bash
scripts/script.sh messages
错误消息设计——面向用户与面向开发者、国际化、错误码。
debug
bash
scripts/script.sh debug
调试技术——根因分析、二分法、链路追踪。
checklist
bash
scripts/script.sh checklist
生产应用错误处理检查清单。
help
bash
scripts/script.sh help
version
bash
scripts/script.sh version
配置项
| 变量 | 描述 |
|---|
| ERROR_DIR | 数据目录(默认:~/.error/) |
由BytesAgain提供 | bytesagain.com | hello@bytesagain.com