jonasmerlin
jonasmerlin10mo ago

Where is client side error handling documented?

In the docs, I can only find error handling for the backend. But I want to get the TRPCError code in the frontend.
3 Replies
jonasmerlin
jonasmerlin10mo ago
Basically, I want to get the code on the client side. Is that posible?
Alex / KATT 🐱
Alex / KATT 🐱10mo ago
Error Formatting | tRPC
The error formatting in your router will be inferred all the way to your client (& React components)
aryzing
aryzing9mo ago
@Alex / KATT 🐱 in the docs linked above, where does trpc.addPost.useMutation() come from? .useMutation() doesn't exist
More Posts
does api.myQuery.invalidate() works if the query is not made at the first place?from testing, the invalidate runs the query, but it shouldn't because there is no cache? how do i iworking with custom errors and trpc errorFormatterHey guys. I'm trying to refactor my app so that all errors extend a BaseError class to make dealing tRPC and OpenTelemetryDoes anyone have experience with instrumenting tRPC with OTEL for tracing? It would be pretty neat Multiple TRPC endpoints on same API, with discrete clients? Any gotchas?I'm building a Sveltekit app that has several pages that will need to behave like SPA's. Rather thanProper way to revalidate SSR but from Client Side, ie. after a success Mutation.This question has been also posted on an specific thread but posting this here will allow people to How to implement tRPC auth ?Do you have any article/github links for how can i create auth in tRPC ?tRPC middleware infer type from another protectedProcedureHello, `protectedProcedure` check and adds a not nullable user to the ctx. However the `studyMiddlewtRPC requests on client vs server for NextJsHello, I'm new to tRPC, and am confused on one thing. I have watched videos of some using a server cpassing user input state variable to all api callsI have a multi organization app and need a way of passing the current organizationId on all requestsIs there a way to extract a procedure signature?I'm looking into extracting certain handlers into functions to keep certain procedures more manageab