\n\n### 👨👧👦 Contributing\n\n- [x] 🙋♂️ Yes, I'd be down to file a PR fixing this bug!",[3027],{"name":3028,"color":3029},"🐛 bug: unconfirmed","e99695",6819,"bug: `httpBatchStreamLink` responses use wrong `content-type` header (`application/json`)","2025-06-12T07:54:06Z","https://github.com/trpc/trpc/issues/6819",0.7526321,{"description":3036,"labels":3037,"number":3041,"owner":3009,"repository":3009,"state":3042,"title":3043,"updated_at":3044,"url":3045,"score":3046},"### Provide environment information\n\n```bash\r\nSystem:\r\n OS: Linux 5.10 Ubuntu 22.04.2 LTS 22.04.2 LTS (Jammy Jellyfish)\r\n CPU: (16) x64 AMD Ryzen 7 5800X 8-Core Processor\r\n Memory: 20.87 GB / 24.98 GB\r\n Container: Yes\r\n Shell: 5.8.1 - /bin/zsh\r\n Binaries:\r\n Node: 18.15.0 - ~/.local/state/fnm_multishells/26222_1680742970821/bin/node\r\n Yarn: 1.22.19 - /mnt/c/Users/user/scoop/apps/nvm/current/nodejs/nodejs/yarn\r\n npm: 9.5.0 - ~/.local/state/fnm_multishells/26222_1680742970821/bin/npm\r\n```\n\n### Describe the bug\n\nI think it's related to #1406 but has already been fixed. not really sure where the mistake is. let me explain what happens\r\n\r\nwhen i try to add an input validation with zod in the router: `publicProcedure.input(z.object({url: z.string()})).mutation(...`, i get this:\r\n\r\n\r\nbut when i try log the `body`, `query`, and `params` in the context and in the router, i get this:\r\n\r\n\r\n\r\nwhat i dont understand is how is this a bad request when i can log it out without the input validator? it feels like it gets stripped away but it doesnt because i can log out the values?\r\n\r\n---\r\n\r\nanother thing i tested is with this:\r\n\r\n```ts\r\n...\r\ntest: publicProcedure\r\n .input(z.object({ url: z.string() }).optional()) // i put optional so it goes through\r\n .mutation(({ input, ctx }) => {\r\n // here i log out the input and the request body\r\n return { input, ctx: { body: ctx.req.body } };\r\n}),\r\n```\r\n\r\nwhen i try to hit this endpoint with postman, i get \r\n\r\n\r\nvoila, ctx body has content but input doesnt have.\r\n\r\nfor my context, it is defined like this:\r\n\r\n```ts\r\nexport const createContext = async ({\r\n req,\r\n res,\r\n}: CreateFastifyContextOptions) => {\r\n console.log(\"-------------\");\r\n console.log(\"THIS IS INSIDE THE CONTEXT\");\r\n console.log(\"req.body\", req.body);\r\n console.log(\"req.query\", req.query);\r\n console.log(\"req.params\", req.params);\r\n\r\n const ctx: CreateContextOptions = {\r\n req,\r\n res,\r\n prisma,\r\n };\r\n return ctx;\r\n};\r\n```\r\n\n\n### Link to reproduction\n\nn/a\n\n### To reproduce\n\nid be happy to add a reproduction when this gets noticed\n\n### Additional information\n\nThis is the error when i just `return error` in the `errorFormatter`\r\n\r\n```bash\r\n{\r\n \"level\": 50,\r\n \"time\": 1680741236320,\r\n \"pid\": 23414,\r\n \"hostname\": \"DESKTOP-7JIP2D6\",\r\n \"reqId\": \"req-3\",\r\n \"req\": {\r\n \"method\": \"POST\",\r\n \"url\": \"/trpc/conclude.create\",\r\n \"hostname\": \"localhost:4000\",\r\n \"remoteAddress\": \"127.0.0.1\",\r\n \"remotePort\": 53330\r\n },\r\n \"res\": {\r\n \"statusCode\": 500\r\n },\r\n \"err\": {\r\n \"type\": \"TypeError\",\r\n \"message\": \"Cannot read properties of undefined (reading 'httpStatus')\",\r\n \"stack\": \"TypeError: Cannot read properties of undefined (reading 'httpStatus') at \u003Canonymous> (/home/joogie/Documents/cod\r\nes/node/conclusion/node_modules/.pnpm/@trpc+server@10.18.0/node_modules/@trpc/server/dist/config-055ae8e4.js:64:29) at Array.m\r\nap (\u003Canonymous>) at Object.getHTTPStatusCode (/home/joogie/Documents/codes/node/conclusion/node_modules/.pnpm/@trpc+server@10.\r\n18.0/node_modules/@trpc/server/dist/config-055ae8e4.js:61:38) at endResponse (/home/joogie/Documents/codes/node/conclusion/nod\r\ne_modules/.pnpm/@trpc+server@10.18.0/node_modules/@trpc/server/dist/resolveHTTPResponse-94b380d2.js:46:29) at Object.resolveHT\r\nTPResponse (/home/joogie/Documents/codes/node/conclusion/node_modules/.pnpm/@trpc+server@10.18.0/node_modules/@trpc/server/dis\r\nt/resolveHTTPResponse-94b380d2.js:195:16) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at fas\r\ntifyRequestHandler (/home/joogie/Documents/codes/node/conclusion/node_modules/.pnpm/@trpc+server@10.18.0/node_modules/@trpc/se\r\nrver/dist/adapters/fastify/index.js:25:20) at Object.\u003Canonymous> (/home/joogie/Documents/codes/node/conclusion/node_modules/.p\r\nnpm/@trpc+server@10.18.0/node_modules/@trpc/server/dist/adapters/fastify/index.js:67:9)\"\r\n },\r\n \"msg\": \"Cannot read properties of undefined (reading 'httpStatus')\"\r\n}\r\n```\n\n### 👨👧👦 Contributing\n\n- [ ] 🙋♂️ Yes, I'd be down to file a PR fixing this bug!",[3038],{"name":3039,"color":3040},"👻 invalid","e4e669",4142,"closed","bug: body undefined in fastify","2023-04-20T12:02:35Z","https://github.com/trpc/trpc/issues/4142",0.71639466,{"description":3048,"labels":3049,"number":3050,"owner":3009,"repository":3009,"state":3042,"title":3051,"updated_at":3052,"url":3053,"score":3054},"### Provide environment information\n\n```\r\n System:\r\n OS: macOS 12.5.1\r\n CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz\r\n Memory: 233.28 MB / 16.00 GB\r\n Shell: 5.8.1 - /bin/zsh\r\n Binaries:\r\n Node: 18.7.0 - /usr/local/bin/node\r\n Yarn: 1.22.19 - /usr/local/bin/yarn\r\n npm: 8.15.0 - /usr/local/bin/npm\r\n Browsers:\r\n Chrome: 104.0.5112.101\r\n Firefox: 103.0.2\r\n Safari: 15.6.1\r\n npmPackages:\r\n @trpc/client: ^9.26.0 => 9.26.0 \r\n @trpc/next: ^9.26.0 => 9.26.0 \r\n @trpc/react: ^9.26.0 => 9.26.0 \r\n @trpc/server: ^9.26.0 => 9.26.0 \r\n next: 12.2.0 => 12.2.0 \r\n react: 18.2.0 => 18.2.0 \r\n react-query: ^3.39.2 => 3.39.2 \r\n```\n\n### Describe the bug\n\nI need to write/read larger PNG Base64 strings to the database (3x 1MB). It works as long as the total file size of all three images is less than 700 KB. When the images are larger I get this error:\r\n```\r\nTRPCClientError: Unexpected token \u003C in JSON at position 0\r\n at Function.from (.../node_modules/@trpc/client/dist/TRPCClientError-bfee2bf5.cjs.dev.js:69:14)\r\n at .../node_modules/@trpc/client/links/httpBatchLink/dist/trpc-client-links-httpBatchLink.cjs.dev.js:208:50\r\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {\r\n originalError: SyntaxError: Unexpected token \u003C in JSON at position 0\r\n at JSON.parse (\u003Canonymous>)\r\n at Response.json (node:internal/deps/undici/undici:2291:23)\r\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5),\r\n shape: undefined,\r\n data: undefined,\r\n isDone: false,\r\n [cause]: SyntaxError: Unexpected token \u003C in JSON at position 0\r\n at JSON.parse (\u003Canonymous>)\r\n at Response.json (node:internal/deps/undici/undici:2291:23)\r\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\r\n}\r\n```\r\n\r\nJust using prisma without trpc is working as well!\r\nuseMutation and useQuery without w+r images is also working.\n\n### To reproduce\n\n```javascript\r\n// Generate Base64:\r\n\r\nconst convertBase64 = (file: any) => {\r\n return new Promise((resolve, reject) => {\r\n const fileReader = new FileReader();\r\n fileReader.readAsDataURL(file)\r\n fileReader.onload = async () => resolve(fileReader.result)\r\n fileReader.onerror = (error) => reject(error)\r\n })\r\n}\r\n\r\nexport const handleFileRead = (Event: React.ChangeEvent\u003CHTMLInputElement>) => {\r\n const { files } = Event.target;\r\n const file = files?.[0]\r\n\r\n return convertBase64(file)\r\n}\r\n```\n\n### Additional information\n\n_No response_\n\n### 👨👧👦 Contributing\n\n- [ ] 🙋♂️ Yes, I'd be down to file a PR fixing this bug!",[],2589,"bug: ","2022-08-29T14:01:07Z","https://github.com/trpc/trpc/issues/2589",0.72036916,{"description":3056,"labels":3057,"number":3063,"owner":3009,"repository":3009,"state":3042,"title":3064,"updated_at":3065,"url":3066,"score":3067},"### Provide environment information\n\n System:\r\n OS: Windows 10 10.0.19045\r\n CPU: (16) x64 Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz\r\n Memory: 6.51 GB / 15.94 GB\r\n Binaries:\r\n Node: 20.12.2 - C:\\Program Files\\nodejs\\node.EXE\r\n npm: 10.5.0 - C:\\Program Files\\nodejs\\npm.CMD\r\n pnpm: 9.0.6 - ~\\AppData\\Roaming\\npm\\pnpm.CMD\r\n bun: 1.1.6 - ~\\AppData\\Roaming\\npm\\bun.CMD\r\n Browsers:\r\n Edge: Chromium (124.0.2478.51)\r\n Internet Explorer: 11.0.19041.3636\r\n\n\n### Describe the bug\n\nCannot get infered type on route\r\n\r\n\r\n\r\n\r\n\r\n\n\n### Link to reproduction\n\na\n\n### To reproduce\n\nCannot get infered type on route\n\n### Additional information\n\n_No response_\n\n### 👨👧👦 Contributing\n\n- [X] 🙋♂️ Yes, I'd be down to file a PR fixing this bug!",[3058,3059,3062],{"name":3039,"color":3040},{"name":3060,"color":3061},"⏮ needs reproduction","000055",{"name":3028,"color":3029},5705,"bug: cannot get router type output","2025-03-20T15:42:23Z","https://github.com/trpc/trpc/issues/5705",0.7325632,{"description":3069,"labels":3070,"number":3074,"owner":3009,"repository":3009,"state":3042,"title":3075,"updated_at":3076,"url":3077,"score":3078},"### Area of Improvement\n\nMarking this as a doc issue as it has an easy workaround which could be documented. Came across this error when following `trpc` quickstart in a new project. I ended up copying the `tsconfig.json` across from `trpc` itself until I found the line that made it compile: `\"skipLibCheck\": true`. \n\nOr change the type def itself? I was a bit surprised `null` is not compatible with type `never | null` - who knew? It can be replicated here:\n\n```ts\nexport type Test\u003CT> = T | null\n\nexport const test: Test\u003Cnever> = null\n```\n\nThat's the equivalent of the type def, found in `subscriptions.d.ts`, which produces the error:\n\nType `null` is not assignable to type `never`\n\nNice project! \n\n### Link to related docs\n\n_No response_\n\n### Additional information\n\n_No response_\n\n### 👨👧👦 Contributing\n\n- [x] 🙋♂️ Yes, I'd be down to file a PR implementing the suggested changes!",[3071],{"name":3072,"color":3073},"📚 documentation / examples","0075ca",6682,"docs: 'ConnectionPendingState' incorrectly extends interface 'ConnectionStateBase\u003Cnever>","2025-04-08T20:04:51Z","https://github.com/trpc/trpc/issues/6682",0.73385084,{"description":3080,"labels":3081,"number":3083,"owner":3009,"repository":3009,"state":3042,"title":3084,"updated_at":3085,"url":3086,"score":3087},"### Provide environment information\n\n```\n System:\n OS: Windows 11 10.0.26100\n CPU: (16) x64 AMD Ryzen 7 9800X3D 8-Core Processor \n Memory: 32.95 GB / 63.61 GB\n Binaries:\n Node: 22.14.0 - C:\\P\\apps\\nodejs\\node.EXE\n Yarn: 1.22.19 - C:\\Program Files (x86)\\Yarn\\bin\\yarn.CMD\n npm: 10.9.2 - C:\\P\\apps\\nodejs\\npm.CMD\n pnpm: 10.11.0 - ~\\AppData\\Local\\pnpm\\pnpm.EXE\n bun: 1.2.5 - ~\\.bun\\bin\\bun.EXE\n Browsers:\n Edge: Chromium (127.0.2651.74)\n Internet Explorer: 11.0.26100.1882\n npmPackages:\n @tanstack/react-query: ^5.74.7 => 5.77.2 \n @trpc/client: npm:@trpc/client => 11.1.2 \n @trpc/next: npm:@trpc/next => 11.1.2 \n @trpc/react-query: npm:@trpc/react-query => 11.1.2 \n @trpc/server: npm:@trpc/server => 11.1.2 \n next: ^15.3.1 => 15.3.2 \n react: ^19.1.0 => 19.1.0\n typescript: ^5.8.2 => 5.8.3\n```\n\n\n### Describe the bug\n\nThere seems to be an issue when using `httpBatchStreamLink` on the Vercel `Edge` runtime. The issue was first detected on May 22nd and experienced by at least 2 users (according to Discord), even on older builds.\n\nThe use case is AI Streaming on the Vercel edge network, with async generation on the server side and httpBatchStreamLink as the link. The issue (and attached example) do not show in local next.js development / release modes, only when deployed on Vercel.\n\n✅ The issue does not appear on the 1st streaming request, and seems to still let some part of the streaming generation continue. \n\n\nISSUE: From the 2nd streaming request and onward, the following unexpected behaviors happen:\n\n1. On the server side, a number of similar exceptions are thrown:\n\n2. On the client side, after all the streaming objects are received a 'connection closed' exception is thrown: \n\nThe exception is below:\n```typescript\nTypeError: Cannot read properties of undefined (reading 'return')\n at (node_modules/@trpc/server/dist/unstable-core-do-not-import/stream/utils/disposable.mjs:38:0)\n at (node_modules/@trpc/server/dist/unstable-core-do-not-import/stream/jsonl.mjs:204:0)\n```\n\nAt this moment no workarounds have been found (caching, fluid compute, deployment regions and other vercel settings have no effect), and the issue doesn't seem easy to debug due to only manifesting when deployed to vercel and not in local development.\n\n### Link to reproduction\n\nhttps://github.com/enricoros/repro-streaming-vercel-edge-runtime\n\n### To reproduce\n\nTo reproduce it is necessary to deploy the code on Vercel:\n- https://vercel.com/dashboard > New Project > link to the GitHub repro (repo above) or a clone > Deploy\n- after deployment, the 2nd click on 'start streaming' will cause:\n - the exceptions to show on Vercel Logs (Dashboard > Project > Logs), \n - the client to display a 'Stream closed' exception\n\n\n### Additional information\n\nPossibly related, older edge deployments (on an older tRPC version, a 11 beta) began throwing this different exception:\n```typescript\nError: Symbol.asyncDispose already exists\n at (node_modules/@trpc/server/dist/unstable-core-do-not-import/stream/utils/disposable.mjs:34:0)\n at (node_modules/@trpc/server/dist/unstable-core-do-not-import/stream/utils/asyncIterable.mjs:72:11)\n at (node_modules/@trpc/server/dist/unstable-core-do-not-import/stream/jsonl.mjs:179:70)\n at (node_modules/@trpc/server/dist/unstable-core-do-not-import/stream/jsonl.mjs:120:0)\n at (node_modules/@trpc/server/dist/unstable-core-do-not-import/stream/jsonl.mjs:168:0)\n at (node_modules/@trpc/server/dist/unstable-core-do-not-import/stream/jsonl.mjs:257:0)\n at (node_modules/@trpc/server/dist/unstable-core-do-not-import/stream/jsonl.mjs:149:0)\n```\n\nThis was before commit 5cf2f3e1780f8bfaf43ba564c91a8b428af7cf2d which replaced the code:\n```\n if (it[Symbol.asyncDispose]) {\n throw new Error('Symbol.asyncDispose already exists');\n }\n```\n\nwith a new variant that invokes the former symbol.\n\n### 👨👧👦 Contributing\n\n- [x] This issue is very important to me, and I'd pledge $100 for this - lmk how\n- [ ] 🙋♂️ Yes, I'd be down to file a PR fixing this bug!",[3082],{"name":3028,"color":3029},6785,"bug: HTTP Batch Stream Link exceptions on Vercel Edge runtime","2025-05-26T23:19:52Z","https://github.com/trpc/trpc/issues/6785",0.74207234,{"description":3089,"labels":3090,"number":3097,"owner":3009,"repository":3009,"state":3042,"title":3098,"updated_at":3099,"url":3100,"score":3101},"### Provide environment information\n\n```\r\n System:\r\n OS: macOS 11.6.8\r\n CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz\r\n Memory: 610.94 MB / 32.00 GB\r\n Shell: 5.8 - /bin/zsh\r\n Binaries:\r\n Node: 18.11.0 - ~/.nvm/versions/node/v18.11.0/bin/node\r\n npm: 8.19.2 - ~/.nvm/versions/node/v18.11.0/bin/npm\r\n Browsers:\r\n Brave Browser: 107.1.45.113\r\n Chrome: 106.0.5249.119\r\n Firefox: 105.0.3\r\n Safari: 15.6.1\r\n npmPackages:\r\n @tanstack/react-query: 4.10.0 => 4.10.0 \r\n @trpc/client: 10.0.0-proxy-beta.17 => 10.0.0-proxy-beta.17 \r\n @trpc/next: 10.0.0-proxy-beta.17 => 10.0.0-proxy-beta.17 \r\n @trpc/react: 10.0.0-proxy-beta.17 => 10.0.0-proxy-beta.17 \r\n @trpc/server: 10.0.0-proxy-beta.17 => 10.0.0-proxy-beta.17 \r\n next: 12.3.1 => 12.3.1 \r\n react: 18.2.0 => 18.2.0 \r\n typescript: 4.8.4 => 4.8.4 \r\n```\n\n### Describe the bug\n\nIm trying to utilise NextJs middleware in order to protect all my pages/api routes but I have a problem with `api/trpc` route.\r\nAfter lurking around I found out that the problem lies in httpLink/httpBatchLink due to `fetch` being used by those.\r\nNextjs middleware doing a `redirect` makes that the `api/trpc/...` request will be `text/html` response instead of `application/json` which in turn makes `httpLink/httpBatchLink` throw an error due it expecting an json response.\r\n\r\nFlow: \r\nIncoming request -> NextJs Middleware pick up /api/trpc/.... -> NextJs Middleware redirects /api/trpc request to say /xyz -> `httpLink/httpBatchLink` retrieves request for /api/trpc/.... making a fetch to it -> fetch response here is `text/html` instead of `application/json` and it throws\r\n\r\nSo Could `text/html` response be handled within `httpLink/httpBatchLink` so It would be possible to get back redirect url from such redirected route??\r\n\r\nSomething like ex.\r\nhttps://github.com/trpc/trpc/blob/013c2f281be7eb0e268a59b978509cce7102935f/packages/client/src/links/internals/httpUtils.ts#L141\r\n```\r\n.then((_res) => {\r\n // ----------------------------------------------\r\n const contentType = _res.headers.get(\"content-type\");\r\n\r\n if (contentType === 'text/html' && _res.ok && _res.redirected) {\r\n // either\r\n // throw relevat error type with _res.url so then It can be retreived for making redirect\r\n // handle this somehow for trpc as a valid response and also pass the _res.url so it can be retreived for making redirect\r\n }\r\n\r\n meta.response = _res;\r\n return _res.json();\r\n })\r\n```\r\n\r\n\r\n\n\n### Link to reproduction\n\nhttps://stackblitz.com/edit/github-bbi6vz-nfthcr?file=pages/xyz.tsx\n\n### To reproduce\n\nOpen stackblitz example.\r\nThere is a `middleware` which redirects `trpc/api` requests to `/xyz` page.\r\nIn the console you would see `TRPCClientError: Unexpected token '\u003C', \"\u003C!DOCTYPE \"... is not valid JSON` because redirect makes the `trpc/api` response as `text/html` not `application/json`\r\n\r\n\n\n### Additional information\n\nSimply put, the browser won't do document follow on a redirect originated from a `fetch` request. \r\n\r\nSo I would expect to be able to somehow retrieve the redirect url from within the `httpLink/httpBatchLink` because thats the one responsible to making that fetch call.\n\n### 👨👧👦 Contributing\n\n- [ ] 🙋♂️ Yes, I'd be down to file a PR fixing this bug!",[3091,3094],{"name":3092,"color":3093},"@trpc/client","6095C2",{"name":3095,"color":3096},"🔎 needs more investigation/info","d4c5f9",3081,"httpLink/httpBatchLink on fetch redirect","2022-12-11T18:01:41Z","https://github.com/trpc/trpc/issues/3081",0.74716574,{"description":3103,"labels":3104,"number":3105,"owner":3009,"repository":3009,"state":3042,"title":3106,"updated_at":3107,"url":3108,"score":3109},"### Provide environment information\n\nClient \r\n\r\n```\r\n System:\r\n OS: macOS 13.0.1\r\n CPU: (10) arm64 Apple M1 Max\r\n Memory: 43.13 MB / 32.00 GB\r\n Shell: 3.5.1 - /opt/homebrew/bin/fish\r\n Binaries:\r\n Node: 18.12.1 - /opt/homebrew/bin/node\r\n npm: 8.19.2 - /opt/homebrew/bin/npm\r\n Browsers:\r\n Chrome: 108.0.5359.94\r\n Safari: 16.1\r\n npmPackages:\r\n @tanstack/react-query: ^4.19.1 => 4.19.1\r\n @trpc/client: ^10.4.3 => 10.4.3\r\n @trpc/react-query: ^10.4.3 => 10.4.3\r\n @trpc/server: ^10.4.3 => 10.4.3\r\n react: ^18.2.0 => 18.2.0\r\n typescript: ^4.9.4 => 4.9.4\r\n```\r\n\r\nServer\r\n\r\n```\r\n System:\r\n OS: macOS 13.0.1\r\n CPU: (10) arm64 Apple M1 Max\r\n Memory: 48.50 MB / 32.00 GB\r\n Shell: 3.5.1 - /opt/homebrew/bin/fish\r\n Binaries:\r\n Node: 18.12.1 - /opt/homebrew/bin/node\r\n npm: 8.19.2 - /opt/homebrew/bin/npm\r\n Browsers:\r\n Chrome: 108.0.5359.94\r\n Safari: 16.1\r\n npmPackages:\r\n @trpc/server: ^10.4.3 => 10.4.3\r\n typescript: ^4.9.4 => 4.9.4\r\n```\n\n### Describe the bug\n\nOur client is using `httpBatchLink` and we are encountering an issue when the server determines that the request body is too large. This issue is in regard to how the client handles it.\r\n\r\n## Some background\r\n\r\nThe response from the server is \r\n\r\n\u003Cimg width=\"510\" alt=\"image\" src=\"https://user-images.githubusercontent.com/92300/206494193-a94649b3-1412-4018-b168-37398bd9402d.png\">\r\n\r\nWith a body: \r\n\r\n```json\r\n{\r\n \"statusCode\":413,\r\n \"code\":\"FST_ERR_CTP_BODY_TOO_LARGE\",\r\n \"error\":\"Payload Too Large\",\r\n \"message\":\"Request body is too large\"\r\n}\r\n```\r\n\r\nThe error we get in bubbling up is:\r\n\r\n```\r\nTRPCClientError: Cannot read properties of undefined (reading 'message')\r\n at TRPCClientError.from (transformResult-4e0db787.mjs:13:16)\r\n at httpBatchLink.mjs:200:64\r\n```\r\n\r\nWhere I expect the error to be more like \"Request body is too large\" or something\r\n\r\n## Further debugging\r\n\r\nIf we put a breakpoint in `TRPCClientError.from` we see the following:\r\n\r\n\u003Cimg width=\"807\" alt=\"image\" src=\"https://user-images.githubusercontent.com/92300/206491868-138aebb0-8841-45e0-ba66-7fd4374de5b4.png\">\r\n\r\n## Suggested fix\r\n\r\nOne suggestion could be to change https://github.com/trpc/trpc/blob/d12ae145922a793d5234cc3023c283064e1c12ab/packages/client/src/TRPCClientError.ts#L64\r\n\r\nto\r\n\r\n```ts\r\ncause.error?.message ?? cause.message ?? '' // cause.message will be \"Request body is too large\"\r\n```\n\n### Link to reproduction\n\nHopefully the description above explains it good enough\n\n### To reproduce\n\nHopefully the description above explains it good enough\n\n### Additional information\n\n_No response_\n\n### 👨👧👦 Contributing\n\n- [ ] 🙋♂️ Yes, I'd be down to file a PR fixing this bug!",[],3359,"bug: TRPCClientError.from() fails to some handle responses gracefully (ex. 413 Request body is too large)","2022-12-26T00:05:29Z","https://github.com/trpc/trpc/issues/3359",0.74896425,["Reactive",3111],{},["Set"],["ShallowReactive",3114],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$f-JmnQ2EEhW08heWt0R_Y60ak3G1XkGVLocbgoz58q3M":-1},"/trpc/trpc-openapi/265"]