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
I'm having trouble getting errors to show up correctly as instances of the TRPCClientError class.
If you console.log(err.constructor.name) it's always _y
It seems it's being minified by Vite somewhere but I've played with the configuration a lot and can't seem to figure out anything different.
I realize this may be a Vite issue more so than an electron-trpc issue but I imagine everyone here is likely facing this so curious of a fix.
This issue happens in my own repo and this repos example basic-react project
import { TRPCClientError } from '@trpc/react-query'; // same issue even if you import from '@trpc/client'
try {
await mutateAsync();
} catch (err) {
if (err instanceof TRPCClientError) {
// never happens :(
}
}
The text was updated successfully, but these errors were encountered:
I'm having trouble getting errors to show up correctly as instances of the TRPCClientError class.
If you
console.log(err.constructor.name)
it's always_y
It seems it's being minified by
Vite
somewhere but I've played with the configuration a lot and can't seem to figure out anything different.I realize this may be a Vite issue more so than an
electron-trpc
issue but I imagine everyone here is likely facing this so curious of a fix.This issue happens in my own repo and this repos example basic-react project
The text was updated successfully, but these errors were encountered: