t
tRPC
t
tRPC
How to hide stacktrace from tRPC errors?
Original message was deleted
tRPC
Join
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,111
Members
View on Discord
N
Nick
•
2/15/23, 1:20 PM
You probably want a slightly different error formatter depending on the environment
N
Nick
•
2/15/23, 1:21 PM
That said
:
https://trpc.io/docs/error-handling
Note: the returned stack trace is only available in the development environment.
Note: the returned stack trace is only available in the development environment.
N
Nick
•
2/15/23, 1:21 PM
So if you
're seeing it in prod
, you probably haven
't set NODE
_ENV properly
A
Alex / KATT 🐱
•
2/15/23, 5:25 PM
Stack traces only show up in development
A
Alex / KATT 🐱
•
2/15/23, 5:25 PM
It
's controlled by NODE
_ENV by default but can be configured in the initTRPC fn
Note: the returned stack trace is only available in the development environment.
Note: the returned stack trace is only available in the development environment.