clade-common-errors

Featured

Diagnose and fix Anthropic API errors — authentication, rate limits, Use when working with common-errors patterns. overloaded, context length, and content policy issues. Trigger with "anthropic error", "claude 429", "claude overloaded", "anthropic not working", "debug claude api".

AI & Automation 2,926 stars 433 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Anthropic Common Errors ## Overview Every Anthropic API error includes a `type` field and HTTP status code. Here are the real errors you'll hit and how to fix them. ## Error Reference ## Instructions ### Step 1: `authentication_error` (401) ```json {"type":"error","error":{"type":"authentication_error","message":"invalid x-api-key"}} ``` **Cause:** API key is missing, malformed, or revoked. **Fix:** ```bash # Verify key exists and starts with sk-ant- echo $ANTHROPIC_API_KEY | head -c 10 # Should print: sk-ant-api # Test directly curl https://api.anthropic.com/v1/messages \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "claude-version: 2023-06-01" \ -H "content-type: application/json" \ -d '{"model":"claude-sonnet-4-20250514","max_tokens":10,"messages":[{"role":"user","content":"hi"}]}' ``` --- ### Step 2: `rate_limit_error` (429) ```json {"type":"error","error":{"type":"rate_limit_error","message":"Number of request tokens has exceeded your per-minute rate limit"}} ``` **Cause:** Exceeded requests per minute (RPM) or tokens per minute (TPM). **Fix:** ```typescript // The SDK has built-in retries with backoff const client = new Anthropic({ maxRetries: 3, // default is 2 }); // Or handle manually using the retry-after header try { const msg = await client.messages.create({ ... }); } catch (err) { if (err instanceof Anthropic.RateLimitError) { const retryAfter = err.headers?.['retry-after']; await sleep(Number(retryAfter) * 1000 || 5000); // retry.....

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category