What is the best way to handle Query Errors?
Hello, everyone! I'm testing Drizzle right now and i'm a little confused about what is the best way to handle erros in Drizzle. I have a POST method that creates a user and the e-mail is unique. When the e-mail is already in use and Drizzle throws a error, the error type is DrizzleQueryError, imported from "drizzle-kit/erros", but it seems broken, i dont have the right type for the error code.
Thanks in advance!



1 Reply
@Rossi Hello
U can import DrizzleQueryError from
import { DrizzleQueryError } from 'drizzle-orm/errors';