jCtapukJ
Convex Community16mo ago
1 reply
jCtapuk

instanceof Error

Could you provide the error class type for comparison, for example via

try {
} catch (error) {
// error typescript any
}

I want to know what the error is

if (e isntanceof ConvexError) {
console.log(e.code)
}

Because I tried to find out what kind of error you returned, but I couldn’t find an import for it.
PS Of course, I can check for the presence of the code key and compare it.
2024-09-22_18-54-57.png
Was this page helpful?