chore(trpc): make it log any errors

This commit is contained in:
Artur
2024-08-29 15:13:15 -03:00
parent a5ddea6d66
commit b60bb3d318

View File

@@ -29,6 +29,8 @@ const t = initTRPC.context<typeof createContext>().create({
*/
transformer: superjson,
errorFormatter: ({ error, shape }) => {
console.log(error)
if (error.code === 'INTERNAL_SERVER_ERROR') {
if (shape.data.stack) console.error(error)