Riccardo
Riccardo
TtRPC
Created by Riccardo on 12/18/2024 in #❓-help
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)
14 replies
TtRPC
Created by Riccardo on 10/4/2022 in #❓-help
Unhandled Runtime ErrorTRPCClientError
Call Stack Function.from node_modules@trpc\client\dist\TRPCClientError-09b8a26b.esm.js (57:0) transformRPCResponse node_modules@trpc\client\dist\httpRequest-62c5cce4.esm.js (15:11) eval node_modules@trpc\client\links\httpBatchLink\dist\trpc-client-links-httpBatchLink.esm.js (201:37) I have both createTRPCClient and createReactQueryHooks, bacause I need trpcClient for queries from the state manager. The problem comes when using the latter Some ideas?
3 replies