© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•9mo ago
Reador

instanceof postgres.PostgresError not working

How can I check the error is of instance PostgresError ? It seems the condition is not met...

Even though when console logging the error its clearly a postgres error:

[Error [PostgresError]: duplicate key value violates unique constraint "..."] {
...
}

Im using postgres package as driver.
Drizzle TeamJoin
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

[Postgres] PostgresError: type X already exists.
Drizzle TeamDTDrizzle Team / help
16mo ago
import { PostgresError } from "postgres" - build error?
Drizzle TeamDTDrizzle Team / help
3y ago
PostgresError: type "vector" does not exist
Drizzle TeamDTDrizzle Team / help
12mo ago
PostgresError: relation "Session" does not exist
Drizzle TeamDTDrizzle Team / help
2y ago