({ shape, error })
| 44 | const t = initTRPC.context<typeof createTRPCContext>().create({ |
| 45 | transformer: superjson, |
| 46 | errorFormatter({ shape, error }) { |
| 47 | return { |
| 48 | ...shape, |
| 49 | data: { |
| 50 | ...shape.data, |
| 51 | zodError: |
| 52 | error.cause instanceof ZodError ? error.cause.flatten() : null, |
| 53 | }, |
| 54 | }; |
| 55 | }, |
| 56 | }); |
| 57 | |
| 58 | /** |
nothing calls this directly
no outgoing calls
no test coverage detected