How to hide database ip when using tRPC + Prisma
![](https://utfs.io/f/5f9b1cb1-566b-4dcb-81eb-9761bad23ccf-1nq2cb.png)
Solution:Jump to solution
can you remove the stack and the shape.message from the error before returning for the client?
31 Replies
check the log level
but i think in production there will be no stacktrace
you mean this? I didn't touch these before
![](https://utfs.io/f/4811b57c-024f-4e8d-9138-21fd25597eb9-1nq2cb.png)
try building the app and starting
and check the error
next build
next start
![](https://utfs.io/f/cedd6abc-d8a9-4328-b172-b22482c0283a-1nq2cb.png)
i change my db url to
postgresql://postgres:test@test:1234/postgres
, so you can see the error with db ipError 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.
you can check dealing with errors on the trpc side of things
before they bubble up to the next side of things
![](https://utfs.io/f/a5c88aa6-3a8c-4970-a66a-27c0028177b8-1nq2cb.png)
it still send the error to client
there is a NODE_ENV in your .env.local file?
no
![](https://utfs.io/f/9841aa47-57cc-4495-b1c7-cc9d4dc2a984-1nq2cb.png)
try adding
NODE_ENV=production
and see what happens![](https://utfs.io/f/ea6bc5dd-dafe-49f9-89fe-29ba0cec6f74-1nq2cb.png)