node-pg-error
node-pg-error copied to clipboard
node-postgres now uses an error subclass
The latest version of node-postgres (NPM package "pg") uses a subclass of Error
called DatabaseError
.
- I think it was added around Dec 2019: commit.
- It was exported from 'pg-protocol' in Oct 2020: changelog entry.
Also, pg-error's instructions to modify connection.parseE
and connection.parseN
doesn't seem to work in the latest version of node-postgres.
Suggestion: Update pg-error's ReadMe to tell people that they can just use DatabaseError
now. Would have saved me a bunch of time debugging.