Theo Gravity
Theo Gravity
TtRPC
Created by Theo Gravity on 6/12/2023 in #❓-help
How to use the errorFormatter when using an adapter?
Ah, it was a dumb question. It has nothing to do with adapters.
const t = initTRPC.context<OuterContext>().create({
errorFormatter({ shape }) {

}
});

export const router = t.router;
export const middleware = t.middleware;
export const mergeRouters = t.mergeRouters;
export const procedure = t.procedure;
const t = initTRPC.context<OuterContext>().create({
errorFormatter({ shape }) {

}
});

export const router = t.router;
export const middleware = t.middleware;
export const mergeRouters = t.mergeRouters;
export const procedure = t.procedure;
4 replies
TtRPC
Created by Theo Gravity on 6/10/2023 in #❓-help
How do I log thrown errors from the query/ mutation on the server side globally?
Typing on did help in the autocomplete for the adapter, thanks
trpcExpress.createExpressMiddleware({
router: appRouter,
createContext,
onError({ error, ctx }) {

},
trpcExpress.createExpressMiddleware({
router: appRouter,
createContext,
onError({ error, ctx }) {

},
9 replies
TtRPC
Created by Theo Gravity on 6/10/2023 in #❓-help
How do I log thrown errors from the query/ mutation on the server side globally?
9 replies
TtRPC
Created by Theo Gravity on 6/10/2023 in #❓-help
How do I log thrown errors from the query/ mutation on the server side globally?
It doesn't offer anything around that: https://trpc.io/docs/server/adapters/express
9 replies