error-handling
Error handling patterns across languages and layers — operational vs programmer errors, retry strategies, circuit breakers, error boundaries, HTTP responses, graceful degradation, and structured logging. Use when designing error strategies, building resilient APIs, or reviewing error management.
Why use this skill?
Learn to implement robust error handling in your code. Use the OpenClaw error-handling skill to build resilient APIs, avoid silent crashes, and improve system observability.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/wpank/api-error-handlingWhat This Skill Does
The error-handling skill is a comprehensive framework for OpenClaw AI to architect, evaluate, and implement resilient error management strategies across complex technical stacks. This skill provides the agent with deep knowledge of the distinction between operational errors (expected runtime conditions like network timeouts) and programmer errors (logic bugs). It empowers the agent to suggest robust patterns such as error boundaries, structured logging, circuit breakers, and graceful degradation. By leveraging this skill, the agent can refactor codebases to ensure that exceptions are never swallowed silently and that all errors provide sufficient context for observability and debugging, following the 'fail fast and loud' philosophy.
Installation
To integrate this skill into your environment, use the OpenClaw command-line interface:
clawhub install openclaw/skills/skills/wpank/api-error-handling
Use Cases
- Designing backend API error responses: The skill provides templates for HTTP status codes and standardized error payloads to ensure consistent client-side consumption.
- Refactoring legacy codebases: Identify and replace silent exception suppression with proper error wrapping, allowing for better stack trace visibility.
- Implementing resilience patterns: Configure circuit breakers or retry logic for fragile microservices, particularly when interacting with unstable third-party APIs.
- Reviewing PRs for error hygiene: Analyze code for anti-patterns like bare
exceptblocks in Python,unwrap()calls in Rust, or ignoring errors in Go.
Example Prompts
- "I'm building an Express.js API; can you help me define a custom Error class hierarchy that handles both validation and database errors consistently?"
- "My Go service is failing intermittently due to downstream timeouts. Can you show me how to implement a circuit breaker pattern using these error handling best practices?"
- "Review this Python function for me. It's catching all exceptions and returning null—how can I refactor this to handle specific operational errors properly while letting actual bugs crash the process?"
Tips & Limitations
When applying these patterns, remember that 'failing loud' is critical for development environments, but in production, ensure that error messages sent to the client are sanitized to prevent information disclosure (e.g., leaking DB credentials or stack traces). This skill provides the design patterns but does not automatically rewrite your code. Always perform a security review when implementing global error boundaries, as they can sometimes obscure local security failures if not configured with proper log-level granularity.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-wpank-api-error-handling": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Related Skills
mermaid-diagrams
Create software diagrams using Mermaid syntax. Use when users need to create, visualize, or document software through diagrams including class diagrams, sequence diagrams, flowcharts, ERDs, C4 architecture diagrams, state diagrams, git graphs, and other diagram types. Triggers include requests to diagram, visualize, model, map out, or show the flow of a system.
api-design-principles
Skill by wpank
auto-context
Automatically read relevant context before major actions. Loads TODO.md, roadmap.md, handoffs, task plans, and other project context files so the AI operates with full situational awareness. Use when starting a task, implementing a feature, refactoring, debugging, planning, or resuming a session.
clear-writing
Write clear, concise prose for humans — documentation, READMEs, API docs, commit messages, error messages, UI text, reports, and explanations. Combines Strunk's rules for clearer prose with technical documentation patterns, structure templates, and review checklists.
track-performance
Track the performance of Uniswap LP positions over time — check which positions need attention, are out of range, or have uncollected fees. Use when the user asks how their positions are doing.