Drizzle error instance
Is there a Drizzle error type that i can use for my Fastify global error handler ??
What im looking for is maybe something like the prisma error type
Prisma.PrismaClientKnownRequestError
, And what i want is to identify the drizzle error so i can handle them properly.
this is how my global error handler looks :
If there is a better way to handler db errors that i can use please tell me3 Replies
I believe DB errors come from the underlying DB driver, not Drizzle
im using mysql, so i guess i should check error coming form here ??
https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&ved=2ahUKEwjt4sT1zdqCAxV1TKQEHbIVDRcQFnoECA4QAQ&url=https%3A%2F%2Fwww.npmjs.com%2Fpackage%2Fmysql2&usg=AOvVaw3djR5iwLT6b-TIIJHdLDYm&opi=89978449
Yeah