t
tRPC
A
tRPC
β’
3y ago
β’
5 replies
aryzing
What's the negative code returned in error responses?
What
's the negative error code returned in errors responses and how is it meant to be used by the client
?
Solution
tRPC is compliant with JSON
-RPC and has specific error codes
. You can find them
here
;
The
docs
have a great explanation on handling errors
.
Error Handling | tRPC
Whenever an error occurs in a procedure
, tRPC responds to the client with an object that includes an
"error
" property
. This property contains all the information that you need to handle the error in the client
.
GitHub
trpc/packages/server/src/rpc/codes.ts at 43e0da13073c8e5426c4c4fb6c...
Move Fast and Break Nothing
. End
-to
-end typesafe APIs made easy
.
- trpc
/trpc
Jump to solution
tRPC
Join
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,015
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Was this page helpful?
Yes
No
Similar Threads
Recent Announcements
Similar Threads
How to make typed error responses in the context of a specific query?
A
aryzing / β-help
3y ago
gzip responses
C
crummy / β-help
2y ago
What's the type of errorFormatter parameter
A
Aezral / β-help
3y ago
What is the mutation error type?
A
Answer Overflow / β-help
3y ago