fix: correctly log trpc procedure errors

This commit is contained in:
Artur
2025-01-15 12:36:24 -03:00
parent 8a9e1723d0
commit 372fe14c53

View File

@@ -21,6 +21,8 @@ const t = initTRPC.context<typeof createContext>().create({
transformer: superjson,
errorFormatter: ({ error, shape }) => {
if (error.code === 'INTERNAL_SERVER_ERROR') {
console.error(error)
return {
message: 'Internal server error',
code: shape.code,