Missing keys in TRPCError when returning as JSON
Hey all! I am returning a TRPCError from a custom TRPC server but only the code and name keys seems to be serialized and returned to the client. It's quite strange. If I directly return a key such as error.message I get the string no problem, but if I return the entire error object I only recieve error.code and error.name . Any idea why this is?
Here's a little code snippet:
0 Replies