Skip to content

fix(client): continue connection discovery after HTTP errors - #146

Merged
antfu merged 1 commit into
devframes:mainfrom
webfansplz:fix/connection-meta-fallback
Jul 29, 2026
Merged

fix(client): continue connection discovery after HTTP errors#146
antfu merged 1 commit into
devframes:mainfrom
webfansplz:fix/connection-meta-fallback

Conversation

@webfansplz

@webfansplz webfansplz commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Be related to vitejs/devtools#494

Copilot AI review requested due to automatic review settings July 28, 2026 16:34
@netlify

netlify Bot commented Jul 28, 2026

Copy link
Copy Markdown

Deploy Preview for devfra ready!

Name Link
🔨 Latest commit 8992bce
🔍 Latest deploy log https://app.netlify.com/projects/devfra/deploys/6a68da2d3034ad0008213889
😎 Deploy Preview https://deploy-preview-146--devfra.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@webfansplz
webfansplz marked this pull request as draft July 28, 2026 16:34

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves the resiliency of the devframe client’s connection-meta discovery by treating non-2xx HTTP responses as failures (so the client can continue trying other candidate base URLs), and updates tests to cover the new behavior.

Changes:

  • Check Response.ok and throw on non-success HTTP status before attempting to parse __connection.json.
  • Update existing tests to stub fetch with ok/status and add a regression test ensuring fallback to the next base URL on HTTP error.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
packages/devframe/src/client/rpc.ts Adds explicit response.ok handling during connection-meta discovery to allow fallback across bases on HTTP errors.
packages/devframe/src/client/rpc.test.ts Adjusts fetch stubs for ok/status and adds a test that asserts fallback behavior when the first base returns a non-OK response.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/devframe/src/client/rpc.ts
@webfansplz
webfansplz marked this pull request as ready for review July 28, 2026 16:45
@antfu
antfu merged commit 3f6dfd5 into devframes:main Jul 29, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants