diff --git a/apps/infoalloggi/src/pages/api/trpc/[trpc].ts b/apps/infoalloggi/src/pages/api/trpc/[trpc].ts index 897eb86..396481a 100644 --- a/apps/infoalloggi/src/pages/api/trpc/[trpc].ts +++ b/apps/infoalloggi/src/pages/api/trpc/[trpc].ts @@ -8,14 +8,15 @@ import { createTRPCContext } from "~/server/api/trpc"; export default createNextApiHandler({ createContext: createTRPCContext, - onError: - env.NODE_ENV === "development" - ? ({ path, error }) => { - console.error( - `❌ tRPC failed on ${path ?? ""}: ${error.message}`, - ); - } - : undefined, + onError: ({ path, error }) => { + if (env.NODE_ENV === "development") { + console.error( + `❌ tRPC failed on ${path ?? ""}, msg: ${error.message}`, + ); + } + + console.error(error); + }, router: appRouter, });