Error with v11 when using batching
I'm using the lastest version of v11. When I use the batch link I get an trpc inernal error when batched request are received.
I'm using HonoJS, bun and v11.
Stack trace:
For now i disabled it. Is there a better long term solution?
I'm using HonoJS, bun and v11.
Stack trace:
TRPCError: Body already used
code: "PARSE_ERROR"
at new TRPCError (/usr/src/app/node_modules/@trpc/server/dist/unstable-core-do-not-import/error/TRPCError.mjs:51:9)
at /usr/src/app/node_modules/@trpc/server/dist/adapters/fetch/content-type/json/index.mjs:28:27
16 | if (!input) {
17 | return undefined;
18 | }
19 | return JSON.parse(input);
20 | }
21 | const body = opts.req.headers.get('content-type')?.startsWith('application/json') ? await opts.req.text() : '';
^
error: Body already used
at /usr/src/app/node_modules/@trpc/server/dist/adapters/fetch/content-type/json/index.mjs:21:111
at getRawProcedureInputOrThrow (/usr/src/app/node_modules/@trpc/server/dist/adapters/fetch/content-type/json/index.mjs:11:58)
at /usr/src/app/node_modules/@trpc/server/dist/adapters/fetch/content-type/json/index.mjs:37:36
at getInputs (/usr/src/app/node_modules/@trpc/server/dist/adapters/fetch/content-type/json/index.mjs:10:27)
at /usr/src/app/node_modules/@trpc/server/dist/adapters/fetch/fetchRequestHandler.mjs:104:26
at getInput (/usr/src/app/node_modules/@trpc/server/dist/adapters/fetch/fetchRequestHandler.mjs:103:25)
at /usr/src/app/node_modules/@trpc/server/dist/unstable-core-do-not-import/http/resolveHTTPResponse.mjs:113:45
at getRawInputForBatch (/usr/src/app/node_modules/@trpc/server/dist/unstable-core-do-not-import/http/resolveHTTPResponse.mjs:111:44)
at /usr/src/app/node_modules/@trpc/server/dist/unstable-core-do-not-import/http/resolveHTTPResponse.mjs:136:30TRPCError: Body already used
code: "PARSE_ERROR"
at new TRPCError (/usr/src/app/node_modules/@trpc/server/dist/unstable-core-do-not-import/error/TRPCError.mjs:51:9)
at /usr/src/app/node_modules/@trpc/server/dist/adapters/fetch/content-type/json/index.mjs:28:27
16 | if (!input) {
17 | return undefined;
18 | }
19 | return JSON.parse(input);
20 | }
21 | const body = opts.req.headers.get('content-type')?.startsWith('application/json') ? await opts.req.text() : '';
^
error: Body already used
at /usr/src/app/node_modules/@trpc/server/dist/adapters/fetch/content-type/json/index.mjs:21:111
at getRawProcedureInputOrThrow (/usr/src/app/node_modules/@trpc/server/dist/adapters/fetch/content-type/json/index.mjs:11:58)
at /usr/src/app/node_modules/@trpc/server/dist/adapters/fetch/content-type/json/index.mjs:37:36
at getInputs (/usr/src/app/node_modules/@trpc/server/dist/adapters/fetch/content-type/json/index.mjs:10:27)
at /usr/src/app/node_modules/@trpc/server/dist/adapters/fetch/fetchRequestHandler.mjs:104:26
at getInput (/usr/src/app/node_modules/@trpc/server/dist/adapters/fetch/fetchRequestHandler.mjs:103:25)
at /usr/src/app/node_modules/@trpc/server/dist/unstable-core-do-not-import/http/resolveHTTPResponse.mjs:113:45
at getRawInputForBatch (/usr/src/app/node_modules/@trpc/server/dist/unstable-core-do-not-import/http/resolveHTTPResponse.mjs:111:44)
at /usr/src/app/node_modules/@trpc/server/dist/unstable-core-do-not-import/http/resolveHTTPResponse.mjs:136:30For now i disabled it. Is there a better long term solution?