T
tRPC

How to get unwrapped errors out of proxy client

How to get unwrapped errors out of proxy client

Eensomnium4/21/2023
I'm using sveltekit and in order to redirect from SSR you need to throw an error: https://kit.svelte.dev/docs/load#redirects TRPC wraps all errors in their custom type, so it's not easy to unpack this for svelte without a lot of boilerplate. I tried using custom fetch wrappers or links but it seems this happens further up and I can't easily catch the global error out of trpc (once again without wrapping). Is there an easy way to do this? Thanks!

Looking for more? Join the community!

T
tRPC

How to get unwrapped errors out of proxy client

Join Server