Skip to content

Treat Chrome's "network error" as a lost connection - #1434

Merged
helpcodeai merged 2 commits into
mainfrom
fix/chrome-network-error
Nov 2, 2026
Merged

helpcodeai merged 2 commits into
mainfrom
fix/chrome-network-error

Conversation

@helpcodeai

Copy link
Copy Markdown
Contributor

Summary

Chrome raises TypeError: network error when the connection drops while a response body is being read. isNetworkError did not know this wording, so a user on Cloud got the generic "Something went wrong" screen instead of the "Connection lost" page that reloads by itself once the network is back (Sentry ANYTHINGMCP-CLOUD-FRONTEND-G).

Cloud and self-hosted behave the same: this is the shared frontend error boundary.

Changes

  • packages/frontend/src/lib/network-error.ts: add /^network error$/i to the recognised messages (exact match, so longer messages that merely contain the words are not caught).
  • packages/frontend/tests/e2e/network-drop.spec.ts: one more assertion in the isNetworkError test.

Type

  • Bug fix

Testing

  • Added/updated unit tests
  • Regex checked with node: matches network error and Network Error, not network error x.
  • Frontend Playwright runs in CI (playwright.yml).

Checklist

  • My code follows the existing code style
  • I have tested my changes locally
  • I have updated documentation (if applicable): not needed
  • This PR has a descriptive title

Related Issues

Sentry ANYTHINGMCP-CLOUD-FRONTEND-G

@helpcodeai
helpcodeai enabled auto-merge (squash) November 2, 2026 08:30
@helpcodeai
helpcodeai merged commit 566f507 into main Nov 2, 2026
14 checks passed
@helpcodeai
helpcodeai deleted the fix/chrome-network-error branch November 2, 2026 08:40
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant