jaridmargolin
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