solidjs / solid-start

SolidStart, the Solid app framework
https://start.solidjs.com
MIT License
4.93k stars 371 forks source link

Set X-Error for thrown Responses #1531

Closed Brendonovich closed 2 weeks ago

Brendonovich commented 3 weeks ago

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

What is the current behavior?

Responses thrown inside server functions don't get re-thrown on the client, as they aren't sent to the client with X-Error set.

What is the new behavior?

X-Error will be set when Responses are thrown inside server functions

Other information

Having read through https://github.com/solidjs/solid-router/issues/387, maybe this header should only be set for thrown redirects? Though personally I'd expect returning/throwing to be isomorphic no matter what is returned/thrown

Closes #1512

changeset-bot[bot] commented 3 weeks ago

🦋 Changeset detected

Latest commit: a654a660e98c99a9ac5ed98f6b0aa1c447ef26b2

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