tRPCttRPC
Powered by
RiccardoR
tRPC•15mo ago•
13 replies
Riccardo

TRPC Error does not say router path

Hello,

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)
tRPCJoin
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,015Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

trpc openapi does not work on app router
fahadFfahad / ❓-help
3y ago
Useless TRPC Error messages: Error: ❌ tRPC failed on <no-path>
Yousef ShanawanyYYousef Shanawany / ❓-help
2y ago
tRPC error in app Router (undefined headers)
Thimo_oTThimo_o / ❓-help
3y ago
Not getting legacy router ops in merged tRPC 9 router
NickNNick / ❓-help
3y ago