Skip to content

fix: reject server function calls on 5xx responses without X-Error#2159

Open
adipascu wants to merge 2 commits into
solidjs:1.xfrom
adipascu:fix/server-fn-5xx-rejection
Open

fix: reject server function calls on 5xx responses without X-Error#2159
adipascu wants to merge 2 commits into
solidjs:1.xfrom
adipascu:fix/server-fn-5xx-rejection

Conversation

@adipascu

@adipascu adipascu commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

PR Checklist

What is the current behavior?

Server function calls only reject when the response carries an X-Error header. A 5xx produced below the handler (server function module crashing at import time, proxy/CDN error, dead worker) has no X-Error, so the promise resolves and callers mistake server failure for success.

Minimal reproduction: https://github.com/adipascu/solid-start-server-fn-500-repro

What is the new behavior?

Responses with status >= 500 throw the deserialized result, like X-Error does, falling back to an Error with the status code when the body yields nothing. 4xx responses are untouched since server functions can legitimately return them without X-Error.

Other information

I see the Tests workflow is failing on 1.x itself (every 2026 run is red, including the 1.3.2 release commits), so the failures here are pre-existing. Should I retarget this PR to main? Its packages/start/src/fns/client.ts has the same logic, and I'm happy to do both.

@netlify

netlify Bot commented Jun 12, 2026

Copy link
Copy Markdown

Deploy Preview for solid-start-landing-page ready!

Name Link
🔨 Latest commit d384715
🔍 Latest deploy log https://app.netlify.com/projects/solid-start-landing-page/deploys/6a2b9b62feaf030008c6079b
😎 Deploy Preview https://deploy-preview-2159--solid-start-landing-page.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.

@changeset-bot

changeset-bot Bot commented Jun 12, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d384715

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@solidjs/start Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Jun 12, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@solidjs/start@2159

commit: d384715

@adipascu adipascu marked this pull request as draft June 12, 2026 05:47
@adipascu adipascu marked this pull request as ready for review June 12, 2026 06:00
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.

1 participant