jaridmargolin
jaridmargolin
TtRPC
Created by jaridmargolin on 8/26/2024 in #❓-help
Need more control over error handling
Ok—I thought it might be easier to flesh out the details via Discord chat, but I'm happy to open an issue and discuss solutions in GH. Thanks!
7 replies
TtRPC
Created by jaridmargolin on 8/26/2024 in #❓-help
Need more control over error handling
Adding to this, we don't like the default behavior of getTRPCErrorFromUnknown which will create a TRPCError using the cause message. This means that any uncaught error from deep in our service would bubble up to the end consumer. In particular, we found that there were cases where db errors were being pushed to the client inside of the error message payload. Ideally, we would proxy through errors in dev, put provide general errors messages in production-like environments.
7 replies