remix icon indicating copy to clipboard operation
remix copied to clipboard

Single fetch: Throwing a response stub with a 4xx status causes a turbo-stream error

Open brophdawg11 opened this issue 1 year ago • 1 comments

Reproduction

Thrown error response stubs are properly handled on data requests but not on document requests - see https://github.com/remix-run/remix/pull/9454 and https://github.com/remix-run/remix/pull/9479

System Info

n/a

Used Package Manager

npm

Expected Behavior

Thrown response stubs hydrate up as ErrorResponse instances for use with useRouteError/isRouteErrorResponse

Actual Behavior

turbo-stream tries to serialize the ReponseStub instance and errors

brophdawg11 avatar May 20 '24 14:05 brophdawg11

We ran into a similar case with a redirect response stub in a resource route: https://github.com/remix-run/remix/pull/9479

haines avatar May 22 '24 14:05 haines

🤖 Hello there,

We just published version 2.10.0-pre.0 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

github-actions[bot] avatar Jun 14 '24 20:06 github-actions[bot]

🤖 Hello there,

We just published version 2.10.0 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

github-actions[bot] avatar Jun 25 '24 14:06 github-actions[bot]