claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[Bug] Anthropic API Error: Insufficient Error Handling for 500 Responses

Open neozhang307 opened this issue 1 year ago • 7 comments

Bug Description keep API Error:500 without other info is annoying

Environment Info

  • Platform: darwin
  • Terminal: iTerm.app
  • Version: 1.0.123
  • Feedback ID: 9c77c84e-ffef-4828-ace4-4689b279bc30

Errors

[{"error":"Error: Request was aborted.\n    at AP.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:994:3864)\n    at processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at runNextTicks (node:internal/process/task_queues:69:3)\n    at listOnTimeout (node:internal/timers:569:9)\n    at process.processTimers (node:internal/timers:543:7)","timestamp":"2025-09-24T00:11:43.349Z"},{"error":"MaxFileReadTokenExceededError: File content (29899 tokens) exceeds maximum allowed tokens (25000). Please use offset and limit parameters to read specific portions of the file, or use the GrepTool to search for specific content.\n    at SP2 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1727:432)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async Object.call (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1722:1036)\n    at async bM (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1727:2967)\n    at async file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1808:1361","timestamp":"2025-09-24T00:22:30.200Z"},{"error":"Error: Request was aborted.\n    at AP.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:994:3864)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-09-24T00:35:45.876Z"},{"error":"Error: Request was aborted.\n    at L61._createMessage (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:985:7955)\n    at processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at runNextTicks (node:internal/process/task_queues:69:3)\n    at process.processTimers (node:internal/timers:540:9)","timestamp":"2025-09-24T00:36:17.394Z"},{"error":"Error: Request was aborted.\n    at AP.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:994:3864)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-09-24T02:09:25.040Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n    at aF (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1792:1184)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1792:912\n    at Array.map (<anonymous>)\n    at OX (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1792:903)\n    at yGB (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2887:9393)\n    at XC (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:34:19415)\n    at Ep (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:36:42814)\n    at F9 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:36:38355)\n    at Mh (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:36:38283)\n    at qC (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:36:38137)","timestamp":"2025-09-24T03:02:49.979Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n    at aF (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1792:1184)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1792:912\n    at Array.map (<anonymous>)\n    at OX (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1792:903)\n    at yGB (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2887:9393)\n    at XC (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:34:19415)\n    at Ep (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:36:42814)\n    at F9 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:36:38355)\n    at Mh (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:36:38283)\n    at qC (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:36:38137)","timestamp":"2025-09-24T03:15:49.045Z"},{"error":"Error: Request was aborted.\n    at L61._createMessage (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:985:7955)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-09-24T03:22:47.418Z"},{"error":"Error: Request was aborted.\n    at L61._createMessage (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:985:7955)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-09-24T03:43:18.495Z"},{"error":"Error: Request was aborted.\n    at AP.makeRequest (file:///opt/homebrew/lib/node_

Note: Error logs were truncated.

neozhang307 avatar Sep 24 '25 08:09 neozhang307

I suspect the Opus infra is down because I got a similar error on Claude Code API Error: 500 {"type":"error","error":{"type":"api_error","message":"Overloaded"},"request_id":null}

This only occurs if I select Opus. Sonnet is fine.

discretepackets avatar Sep 24 '25 08:09 discretepackets

Ok, changed to Sonnet, thanks a lot

neozhang307 avatar Sep 24 '25 08:09 neozhang307

I suspect the Opus infra is down because I got a similar error on Claude Code API Error: 500 {"type":"error","error":{"type":"api_error","message":"Overloaded"},"request_id":null}

This only occurs if I select Opus. Sonnet is fine.

Thanks a lot, switch to Sonnet temporary ~

jztan avatar Sep 24 '25 08:09 jztan

They are currently investigating this issue https://status.claude.com/

jakub-digital avatar Sep 24 '25 08:09 jakub-digital

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

github-actions[bot] avatar Dec 06 '25 10:12 github-actions[bot]

This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.

github-actions[bot] avatar Jan 06 '26 10:01 github-actions[bot]

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] avatar Jan 13 '26 14:01 github-actions[bot]