cal
Explore posts from serversTTCTheo's Typesafe Cult
•Created by cal on 7/9/2023 in #questions
Handle custom error class in error UI boundary
Hey guys,
I am throwing a custom error
in a subpage. I then try to handle it using a error UI boundary. Everything works as expected but inside of
error.tsx
is always false. I assume nextjs internally handles/wraps the error. Is there a way to get a hold of the thrown error directly in order to display different UI in case of an GQLError?
Thank you in advance2 replies
TTCTheo's Typesafe Cult
•Created by cal on 6/28/2023 in #questions
Where would I initialize a 3rd party API to use in TRPC routes?
I am currently initializing this client in
server/client.ts
similar to the global definition of prisma. I then import client
in my TRPC router. Does this make sense or would it be smarter to do that somewhere else.
Best reards and thank you in advance 🙂1 replies