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