MCPcopy Create free account
hub / github.com/analogdotnow/Analog / errorFormatter

Function errorFormatter

packages/api/src/trpc.ts:74–83  ·  view source on GitHub ↗
({ shape, error })

Source from the content-addressed store, hash-verified

72 .create({
73 transformer: superjson,
74 errorFormatter({ shape, error }) {
75 return {
76 ...shape,
77 data: {
78 ...shape.data,
79 zodError:
80 error.cause instanceof z.ZodError ? error.cause.flatten() : null,
81 },
82 };
83 },
84 });
85
86export const createCallerFactory = t.createCallerFactory;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected