claude-code - 💡(How to fix) Fix ⎿  API Error: Unable to connect to API... [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#53345Fetched 2026-04-26 05:18:08
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Author
Timeline (top)
labeled ×3commented ×1cross-referenced ×1

Error Message

[{"error":"Error: Request was aborted.\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:3448)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-17T17:50:16.134Z"},{"error":"Error: 502 [Errno 32] Broken pipe\n at generate (/$bunfs/root/src/entrypoints/cli.js:11:52959)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-18T15:48:44.282Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: ECONNREFUSED\n at pp1 (/$bunfs/root/src/entrypoints/cli.js:2746:5253)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T04:58:40.365Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: ECONNREFUSED\n at pp1 (/$bunfs/root/src/entrypoints/cli.js:2746:5253)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T04:58:40.366Z"},{"error":"Error: 502 [Errno 54] Connection reset by peer\n at generate (/$bunfs/root/src/entrypoints/cli.js:11:52959)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-22T08:56:33.897Z"},{"error":"Error: 502 [Errno 54] Connection reset by peer\n at generate (/$bunfs/root/src/entrypoints/cli.js:11:52959)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-22T08:56:33.903Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: ECONNREFUSED\n at pp1 (/$bunfs/root/src/entrypoints/cli.js:2746:5253)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T14:39:32.881Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: ECONNREFUSED\n at pp1 (/$bunfs/root/src/entrypoints/cli.js:2746:5253)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T14:39:32.883Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: ECONNREFUSED\n at pp1 (/$bunfs/root/src/entrypoints/cli.js:2746:5253)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T16:56:06.048Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: ECONNREFUSED\n at pp1 (/$bunfs/root/src/entrypoints/cli.js:2746:5253)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T16:56:06.048Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: ECONNREFUSED\n at pp1 (/$bunfs/root/src/entrypoints/cli.js:2746:5253)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T17:26:06.024Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: ECONNREFUSED\n at pp1 (/$bunfs/root/src/entrypoints/cli.js:2746:5253)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T17:26:06.024Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: ECONNREFUSED\n at pp1 (/$bunfs/root/src/entrypoints/cli.js:2746:5253)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T18:27:03.468Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: ECONNREFUSED\n at pp1 (/$bunfs/root/src/entrypoints/cli.js:2746:5253)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T18:27:03.468Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: ECONNREFUSED\n at pp1 (/$bunfs/root/src/entrypoints/cli.js:2746:5253)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T19:25:30.018Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: ECONNREFUSED\n at pp1 (/$bunfs/root/src/entrypoints/cli.js:2746:5253)\n at processTicksAndRejections (native:7:39)"…

Code Example

[{"error":"Error: Request was aborted.\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:3448)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-17T17:50:16.134Z"},{"error":"Error: 502 [Errno 32] Broken pipe\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:52959)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-18T15:48:44.282Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: ECONNREFUSED\n    at pp1 (/$bunfs/root/src/entrypoints/cli.js:2746:5253)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T04:58:40.365Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: ECONNREFUSED\n    at pp1 (/$bunfs/root/src/entrypoints/cli.js:2746:5253)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T04:58:40.366Z"},{"error":"Error: 502 [Errno 54] Connection reset by peer\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:52959)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-22T08:56:33.897Z"},{"error":"Error: 502 [Errno 54] Connection reset by peer\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:52959)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-22T08:56:33.903Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: ECONNREFUSED\n    at pp1 (/$bunfs/root/src/entrypoints/cli.js:2746:5253)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T14:39:32.881Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: ECONNREFUSED\n    at pp1 (/$bunfs/root/src/entrypoints/cli.js:2746:5253)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T14:39:32.883Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: ECONNREFUSED\n    at pp1 (/$bunfs/root/src/entrypoints/cli.js:2746:5253)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T16:56:06.048Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: ECONNREFUSED\n    at pp1 (/$bunfs/root/src/entrypoints/cli.js:2746:5253)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T16:56:06.048Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: ECONNREFUSED\n    at pp1 (/$bunfs/root/src/entrypoints/cli.js:2746:5253)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T17:26:06.024Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: ECONNREFUSED\n    at pp1 (/$bunfs/root/src/entrypoints/cli.js:2746:5253)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T17:26:06.024Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: ECONNREFUSED\n    at pp1 (/$bunfs/root/src/entrypoints/cli.js:2746:5253)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T18:27:03.468Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: ECONNREFUSED\n    at pp1 (/$bunfs/root/src/entrypoints/cli.js:2746:5253)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T18:27:03.468Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: ECONNREFUSED\n    at pp1 (/$bunfs/root/src/entrypoints/cli.js:2746:5253)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T19:25:30.018Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: ECONNREFUSED\n    at pp1 (/$bunfs/root/src/entrypoints/cli.js:2746:5253)\n    at processTicksAndRejections (native:7:39)"
RAW_BUFFERClick to expand / collapse

Bug Description ⎿  API Error: Unable to connect to API (ConnectionRefused)

Environment Info

  • Platform: darwin
  • Terminal: Apple_Terminal
  • Version: 2.1.112
  • Feedback ID: e94dec8e-151f-4a93-8513-96a4b8ca2bae

Errors

[{"error":"Error: Request was aborted.\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:3448)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-17T17:50:16.134Z"},{"error":"Error: 502 [Errno 32] Broken pipe\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:52959)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-18T15:48:44.282Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: ECONNREFUSED\n    at pp1 (/$bunfs/root/src/entrypoints/cli.js:2746:5253)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T04:58:40.365Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: ECONNREFUSED\n    at pp1 (/$bunfs/root/src/entrypoints/cli.js:2746:5253)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T04:58:40.366Z"},{"error":"Error: 502 [Errno 54] Connection reset by peer\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:52959)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-22T08:56:33.897Z"},{"error":"Error: 502 [Errno 54] Connection reset by peer\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:52959)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-22T08:56:33.903Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: ECONNREFUSED\n    at pp1 (/$bunfs/root/src/entrypoints/cli.js:2746:5253)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T14:39:32.881Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: ECONNREFUSED\n    at pp1 (/$bunfs/root/src/entrypoints/cli.js:2746:5253)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T14:39:32.883Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: ECONNREFUSED\n    at pp1 (/$bunfs/root/src/entrypoints/cli.js:2746:5253)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T16:56:06.048Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: ECONNREFUSED\n    at pp1 (/$bunfs/root/src/entrypoints/cli.js:2746:5253)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T16:56:06.048Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: ECONNREFUSED\n    at pp1 (/$bunfs/root/src/entrypoints/cli.js:2746:5253)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T17:26:06.024Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: ECONNREFUSED\n    at pp1 (/$bunfs/root/src/entrypoints/cli.js:2746:5253)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T17:26:06.024Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: ECONNREFUSED\n    at pp1 (/$bunfs/root/src/entrypoints/cli.js:2746:5253)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T18:27:03.468Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: ECONNREFUSED\n    at pp1 (/$bunfs/root/src/entrypoints/cli.js:2746:5253)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T18:27:03.468Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: ECONNREFUSED\n    at pp1 (/$bunfs/root/src/entrypoints/cli.js:2746:5253)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T19:25:30.018Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: ECONNREFUSED\n    at pp1 (/$bunfs/root/src/entrypoints/cli.js:2746:5253)\n    at processTicksAndRejections (native:7:39)"

Note: Content was truncated.

extent analysis

TL;DR

Check the network connection and firewall settings to ensure they are not blocking the connection to the API endpoint https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest.

Guidance

  • Verify the API endpoint URL is correct and accessible by attempting to access it directly from a web browser or using a tool like curl.
  • Check the network connection and firewall settings to ensure they are not blocking the connection to the API endpoint.
  • Review the error messages for any patterns or common causes, such as connection timeouts or refused connections.
  • Consider testing the API connection from a different network or location to isolate the issue.

Example

No code example is provided as the issue appears to be related to network connectivity rather than code.

Notes

The issue may be related to a temporary outage or issue with the API endpoint, and checking the API provider's status page may provide additional information. Additionally, the error messages suggest a connection refused error, which could be due to a variety of factors including network connectivity, firewall settings, or API endpoint issues.

Recommendation

Apply workaround: Check and adjust network connection and firewall settings to ensure they are not blocking the connection to the API endpoint, and consider testing the API connection from a different network or location to isolate the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix ⎿  API Error: Unable to connect to API... [1 comments, 2 participants]