Closed lingsuann02 closed 1 month ago
Sounds awfully familiar to https://github.com/t3-oss/create-t3-app/issues/1965 I'm not sure if it is a duplicate though? If so, feel free to close this!
Closing because I realised that error object does seem to resolve after the request has been retried three times. This does result in some latency, but I think that this is something I can configure.
Provide environment information
System: OS: Linux 6.1 Ubuntu 20.04.6 LTS (Focal Fossa) CPU: (2) x64 AMD EPYC Memory: 2.17 GB / 4.01 GB Container: Yes Shell: 5.0.17 - /bin/bash Binaries: Node: 20.12.1 - /home/codespace/nvm/current/bin/node Yarn: 1.22.19 - /usr/bin/yarn npm: 10.5.0 - /home/codespace/nvm/current/bin/npm pnpm: 8.15.6 - /home/codespace/nvm/current/bin/pnpm
"ct3aMetadata": { "initVersion": "7.36.2" },
Describe the bug
Hi!
I've just started playing around with TRPC so this could be a result of my lack of understanding of how things work, but I've tried to check the documentation and troubleshoot this issue without any luck. So here goes:
Errors thrown in the server does not seem to resolve in a failed request in the browser or trigger the expected onError callback in react-query.
Given this example query:
and this procedure
Expected result: A response with the correct error code. Actual result: The response is appears to be pending infinitely in the browser and a 200 in the logs.
I'd really like to use this setup for a project of mine. I must be doing something wrong - please help! :)
Reproduction repo
Link
To reproduce
npm create t3-app@latest
Sandbox has been created and linked.
Additional information
The query also seems to be retried infinitely when null is returned on the server. Other people in this thread have also been experiencing this: https://github.com/trpc/trpc/discussions/5919?sort=new Not sure if it's related to the bug with errors though?