lukas
lukas3w ago

Why Trpc duplicates `shape` and `data` as duplicated JSON field on errors in `errorFormatter`?

I am using error formater and internally TRPC duplicates the data information in the JSON response. Please see the screenshot
No description
No description
1 Reply
Alex / KATT 🐱
Convenience, shape.data and data are referentially equal, shape reflects the json body, but data is prob the one you wanna use most of the time Follow the docs on how to do the error formatter

Did you find this page helpful?