Is trpc returns promise?

I am pretty noobie, accept that. Is trpc returns promise? If it doesnt how do we handle errors?
2 Replies
bedesqui
bedesqui3y ago
In the frontend, trpc leverages react query to handle async values. This gives you everything from data to loading states to error states. in the backend, whenever a procedure throws an error, the response sent to the frontend will include details about the error. see: https://trpc.io/docs/v10/error-handling
Error Handling | tRPC
Whenever an error occurs in a procedure, tRPC responds to the client with an object that includes an "error" property. This property contains all the information that you need to handle the error in the client.
Çağlar
Çağlar3y ago
great, thank you
Want results from more Discord servers?
Add your server