I have a tRPC client that sometimes fails to call my procedures/queries. I have many of them and find difficult to track back the router path that failed. Am I missing something? In the stacktrace I only get this:
TRPCClientError: Unexpected token 'A', "An error o"... is not valid JSON at TRPCClientError.from (file:///voice/nodemodules/.pnpm/@trpc+client@11.0.0-rc.364@trpc+server@11.0.0-rc.364/node_modules/@trpc/client/dist/TRPCClientError.mjs:37:16) at file:///voice/nodemodules/.pnpm/@trpc+client@11.0.0-rc.364@trpc+server@11.0.0-rc.364/node_modules/@trpc/client/dist/links/internals/httpUtils.mjs:138:36 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { meta: { response: Response { [Symbol(realm)]: null, [Symbol(state)]: [Object], [Symbol(headers)]: [HeadersList] } }, shape: undefined, data: undefined, [cause]: SyntaxError: Unexpected token 'A', "An error o"... is not valid JSON at JSON.parse (<anonymous>) at parseJSONFromBytes (node:internal/deps/undici/undici:5584:19) at successSteps (node:internal/deps/undici/undici:5555:27) at fullyReadBody (node:internal/deps/undici/undici:1665:9) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async specConsumeBody (node:internal/deps/undici/undici:5564:7)
Continue the conversation
Join the Discord to ask follow-up questions and connect with the community
t
tRPC
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.