-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Labels
help wantedExtra attention is neededExtra attention is needed
Description
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 :(
}
}
Metadata
Metadata
Assignees
Labels
help wantedExtra attention is neededExtra attention is needed