Merge pull request #136 from MAGICGrants/error-logging

fix: correctly log trpc procedure errors
This commit is contained in:
Artur
2025-01-15 12:38:22 -03:00
committed by GitHub

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,