aryzing
aryzing
TtRPC
Created by cadams on 11/1/2023 in #❓-help
When error in tRPC route, the error message is vauge
@cadams how are you even getting those messages printed? Is there an onError formatter set up on the server?
12 replies
TtRPC
Created by sommeeeR on 11/3/2023 in #❓-help
Check if Role is ADMIN
3 replies
TtRPC
Created by aryzing on 11/1/2023 in #❓-help
How to limit payload size?
Is the data already received by the time createContext is ran?
4 replies
TtRPC
Created by aryzing on 11/1/2023 in #❓-help
How to limit payload size?
Seems a raw Node.js server would work with something similar to the following, however the 'data' event inside createContext is not firing
opts.req.on("data", (chunk) => {
console.log("Received chunk with size: ", chunk.size);
});
opts.req.on("data", (chunk) => {
console.log("Received chunk with size: ", chunk.size);
});
4 replies
TtRPC
Created by aryzing on 10/31/2023 in #❓-help
How to configure context for a standalone server?
Thanks, in the end I found it here, https://trpc.io/docs/server/adapters/standalone#2-configure-the-standalone-server The standalone config docs use the createContext function but don't define it, and the createContext docs define it but don't use it with createHTTPServer, so had to put both doc pages together to figure out how to do it for the standalone server
6 replies
TtRPC
Created by aryzing on 10/31/2023 in #❓-help
What's the negative code returned in error responses?
The error handling docs are great, and would be better if they contained an explanation of (or link to) what code is. Towards the end of the docs, there's a collapsed section at the end of this page explaining the codes, https://trpc.io/docs/rpc#error-codes---json-rpc-20-error-codes
6 replies
TtRPC
Created by jonasmerlin on 10/19/2023 in #❓-help
Where is client side error handling documented?
@Alex / KATT 🐱 in the docs linked above, where does trpc.addPost.useMutation() come from? .useMutation() doesn't exist
5 replies