tRPCttRPC
Powered by
OoijazO
tRPC•2y ago
Ooijaz

Preventing uncaught error propagation from server to client

Hello guys, is there any way to create default error handler?
I want to avoid leaking internal information to the client.

Example scenario:
My database is down.
Exception has been thrown by the database driver.
Result:
TRPCClientError in a browser: connect ECONNREFUSED 127.0.0.1:5432
Desired result:
TRPCClientError in a browser: "Internal server error"
tRPCJoin
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,015Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Preventing action from throwing error due to zod schema?
switzSswitz / ❓-help
9mo ago
'react-server-dom-webpack/client' error
OrekiOOreki / ❓-help
3y ago
Prevent client tsc from typechecking the server
🦊�🦊 / ❓-help
15mo ago