Accessing original thrown value from Effect.runPromise
In Svelte-kit server endpoints (in
Consider this endpoint:
My intention is that the thrown
See this Effect playground for a minimal reproduction, without Svelte-kit: https://effect.website/play#75ab306c1adc
+server.ts files), you can return a redirect response by using the Svelte-kit exported function redirect(status: StatusCode, location: string | URL): never. This function will throw with an instance of a class Redirect. Svelte-kit will catch errors that are thrown by your handlers and detect if they are an instance of this class Redirect. If so, they return a redirect response.Consider this endpoint:
My intention is that the thrown
Redirect will make its way back to Svelte-kit, but instead Effect throws a FiberFailure. How can I get the original thrown value?See this Effect playground for a minimal reproduction, without Svelte-kit: https://effect.website/play#75ab306c1adc
