db-errors
JSON →Unified error API for node.js SQL database drivers (MySQL, PostgreSQL, SQLite3, MSSQL). Current stable version 0.2.3. This library normalizes driver-specific errors (like unique constraint violations, not-null violations) into standard error classes, providing consistent properties such as table name, column name, and constraint name across databases. It is in early stages (pre-1.0) with limited active development, but is widely used as a dependency in ORMs like objection.js. Alternative error handling is driver-specific; this library simplifies error handling.
Resources
packagedb-errors ↗