mirror of
https://github.com/MAGICGrants/campaign-site.git
synced 2026-01-09 12:27:59 -05:00
fix: correctly log trpc procedure errors
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user