TypeError: Cannot read properties of undefined (reading 'timeoutType') #4112
Unanswered
magnusrodseth
asked this question in
Q&A
Replies: 1 comment 4 replies
-
It's Node.js, and to be more specific, it's Unidici, their HTTP client. There are only 2 places where it can break there - https://github.com/nodejs/undici/blob/dc8d11183fb95aa93d296bde3e21501856849367/lib/client.js#L1207-L1220 I'd ask in their repo to see if they have an idea under what circumstances this can be triggered. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
To set the stage, I am using a Turborepo with Next.js, tRPC and Clerk for authentication and user management.
Ever since the start of my project, I sometimes get this error message:
The error happens sporadically, and I have not been able to pinpoint any pattern of it occurring. The thing that baffles me is that when I Google this error, no other discussions around it exist.
It may happen because I throw
TRPCError
in my server code, but shouldn't that just be handled using theerror
object inuseQuery
/useMutation
on the client? There should be no need to manually use.catch()
.The stack trace is also very challenging to navigate, and does not offer much help. Is
timeoutType
something tRPC-specific, or is it just related tonode.js
?Do you have any general recommendations on how to debug and fix this issue?
Beta Was this translation helpful? Give feedback.
All reactions