ensomnium
How to get unwrapped errors out of proxy client
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!
2 replies