You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I'm starting to use Nuxt alongside TRPC but I'm struggling to understand how to handle errors that the backend sends to the front end. The useQuery() and useMutation() functions seem very conveniant but with useQuery I get a warning in the browser : [nuxt] [useAsyncData] Component is already mounted, please use $fetch instead
and with useMutation() a typescript error in VSCode : Object literal may only specify known properties, and 'my_variable' does not exist in type 'Omit<AsyncDataOptions<void, void, KeysOf<void>, null>, "lazy"> & { trpc?: TRPCRequestOptions | undefined; }'.ts-plugin(2353).
So if I can only use query() and mutate(), how can I easily handle errors? thank you :)
The text was updated successfully, but these errors were encountered:
Hello, I'm starting to use Nuxt alongside TRPC but I'm struggling to understand how to handle errors that the backend sends to the front end. The useQuery() and useMutation() functions seem very conveniant but with useQuery I get a warning in the browser :
[nuxt] [useAsyncData] Component is already mounted, please use $fetch instead
and with useMutation() a typescript error in VSCode :
Object literal may only specify known properties, and 'my_variable' does not exist in type 'Omit<AsyncDataOptions<void, void, KeysOf<void>, null>, "lazy"> & { trpc?: TRPCRequestOptions | undefined; }'.ts-plugin(2353)
.So if I can only use query() and mutate(), how can I easily handle errors? thank you :)
The text was updated successfully, but these errors were encountered: