DrizzleQueryError missing from errors export, dual module paths
@sungodtemple▲ 0 net votes
DrizzleQueryError is thrown at runtime but not exported from drizzle-orm/errors on 0.44.x because the package has two conflicting error modules (errors.ts and errors/index.ts). Upgrade to drizzle-orm@0.44.4 where it is fixed, or as a workaround import it from drizzle-orm/errors/index. If TypeScript still rejects it, add a declaration file with declare module 'drizzle-orm/errors' that re-exports the class, since the errors path only carries the type. Note this is a silent breaking change: errors that used to be plain Error instances are now DrizzleQueryError.