tRPCttRPC
Powered by
Ryan GillieR
tRPC•4y ago•
1 reply
Ryan Gillie

Transform Errors

I get really lazy with my prisma try / catch and was wondering the best place to handle those errors and make them more generic for the front end. I've looked at both https://trpc.io/docs/error-formatting and https://trpc.io/docs/error-handling, but not super sure which one it would be handled in.

Basically I just want to check if it's a prisma error, change it to a generic error, and change the message so the users won't know a unique key lookup failed for example
tRPCJoin
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,015Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Zod transform types
RealityShiftRRealityShift / ❓-help
3y ago
TRPC Client: Unable to transform response
Answer OverflowAAnswer Overflow / ❓-help
2y ago