Api Error Handling
CheckedProvides API guidance and assistance for developing backend services and APIs.
Install on your platform
Showing Claude Code. One command installs this skill into any of the agents below.
- 1
Run this in your project
terminal$ npx skills add secondsky/claude-skills --skill api-error-handling -a claude-code Uses the open-source
skillsCLI and needs Node.js. Add-gto install it for your user instead of this project.
What we know about this skill
Publisher
secondsky
Taken from the source listing. We haven't verified who controls this account.
Install target
Live repository
Not pinned. Installing fetches whatever the repository holds at the time you run the command.
Automated safety checks
This skill passed all 6 checks. We read its files at one commit and looked for the things that make a skill dangerous to run — not for whether it works.
Declares what it does: passed
SKILL.md parses and declares a name and a description.
SKILL.md exists, its frontmatter parses, and it declares a name and a description.
No undeclared network calls: passed
Makes no network calls.
Every host the skill dials — from its scripts, its config endpoints or the commands it tells the agent to run — is either well-known package and API infrastructure or declared in its own frontmatter. Links in documentation are not counted.
No obfuscated payloads: passed
No encoded or obfuscated payloads.
No base64, hex or compressed blob is decoded and then executed, and no encoded shell commands.
No credential access: passed
Reads no keys, tokens, keychains or credential files.
Neither the code nor the SKILL.md instructions read SSH keys, cloud credentials, keychains, token stores, browser cookie databases or dotfiles that hold secrets.
No pipe-to-shell installers: passed
No pipe-to-shell or download-and-run installers.
No `curl … | sh` pattern, in the code or in the instructions, that runs code fetched at run time.
Pinned to a commit: passed
Scanned secondsky/claude-skills at 8837836131.
The exact upstream commit SHA that was scanned is recorded, so the result refers to specific bytes.
- Commit
- 8837836131
- Scanned
- 2 files, 352 lines
About this skill
What it does
This skill equips AI agents to robustly manage API failures by automatically retrying failed requests and gracefully handling error responses. It ensures backend operations remain stable even when external services are temporarily unavailable or return unexpected status codes.
When to use it
- Retry Logic: Implement automatic retries for transient network errors or rate-limited endpoints without manual intervention.
- Error Transformation: Convert raw HTTP error codes into user-friendly messages or structured internal logs for debugging.
- Circuit Breaker Patterns: Prevent cascading failures by stopping requests to a failing service after a threshold of consecutive errors.
- Fallback Strategies: Trigger alternative data sources or default values when primary API calls fail consistently.
Key capabilities
- Automatic request retry mechanisms with configurable delays.
- Parsing and categorization of HTTP status codes (e.g., 4xx vs. 5xx).
- Structured error logging for observability and debugging.
- Graceful degradation of functionality during service outages.
Example prompts
- "Retry the user profile fetch three times with exponential backoff if it fails due to a network timeout."
- "If the payment gateway returns a 503 Service Unavailable, log the error and notify the admin dashboard instead of crashing the transaction flow."
- "Handle API errors by returning a default cached response when the live data source is unreachable."
Tips & gotchas
Ensure your retry logic includes jitter or exponential backoff to avoid overwhelming the target service during outages. Always distinguish between client errors (like 401 Unauthorized) and server errors (like 500 Internal Server Error), as retries are generally ineffective for the former.