moloch
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:
1 replies
Is there a way to define the Websocket protocol when using wsLink()
I am attempting to use tRPC with Azure's Pub/Sub Websockets service it appears to require custom protocols to be defined as explained here: https://learn.microsoft.com/en-us/azure/azure-web-pubsub/reference-json-webpubsub-subprotocol
They give the following code example:
How might this be done using:
1 replies
Cannot get subscription event to fire
Ripping my hair out here trying to get Websockets working with tRPC and Next. Everything seems to be working and the frontend client is connecting to my websocket server, however triggering the addFact mutation does not not successfully emit the new catFact despite there not being any errors. I've looked at various repos that achieve similar functionality and haven't been able to spot the problem, does anyone have any guidance?
8 replies