Log tRPC errors in all environments
Build and Push Docker Image / build (push) Has been cancelled
Details
Build and Push Docker Image / build (push) Has been cancelled
Details
Previously only logged in development mode, making production debugging impossible. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
fcafbaadd3
commit
43680d4173
|
|
@ -43,12 +43,9 @@ const handler = (req: Request) => {
|
|||
},
|
||||
}
|
||||
},
|
||||
onError:
|
||||
process.env.NODE_ENV === 'development'
|
||||
? ({ path, error }) => {
|
||||
console.error(`❌ tRPC failed on ${path ?? '<no-path>'}:`, error)
|
||||
}
|
||||
: undefined,
|
||||
onError: ({ path, error }) => {
|
||||
console.error(`tRPC failed on ${path ?? '<no-path>'}:`, error.message)
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue