tRPCttRPC
Powered by
elisE
tRPC•2y ago•
1 reply
elis

Error formatting with trpcExpress.createExpressMiddleware

I'm trying to figure out how to do error formatting but it's unclear how to do it in the context of
trpcExpress.createExpressMiddleware
trpcExpress.createExpressMiddleware
- The documentation use
trpcInit.context().create({ errorFormatter(opts) { ... })
trpcInit.context().create({ errorFormatter(opts) { ... })
which I'm not using as I'm following the React Query example from the docs.

Is there a concrete example I can refer to where should I plug the
errorFormatter(opts)
errorFormatter(opts)
?
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

trpc error formatting
v28Vv28 / ❓-help
2mo ago
Zod formatting Error
Nacho EliasNNacho Elias / ❓-help
2y ago
Error Handling vs Error Formatting
rdRrd / ❓-help
3y ago