How to use the errorFormatter when using an adapter?
The example here uses
context.create()
, which isn't something you do when using an adapter.
I don't see an errorFormatter
exposed in createExpressMiddleware()
https://trpc.io/docs/server/error-formattingError Formatting | tRPC
The error formatting in your router will be inferred all the way to your client (& React components)
Solution:Jump to solution
Ah, it was a dumb question. It has nothing to do with adapters.
```ts
const t = initTRPC.context<OuterContext>().create({
errorFormatter({ shape }) {...
1 Reply
Solution
Ah, it was a dumb question. It has nothing to do with adapters.