node-pg-error
node-pg-error copied to clipboard
An error class for Node.js that parses PostgreSQL's ErrorResponse format and sets human readable field names. Works with node-pg, too.
The latest version of node-postgres (NPM package "pg") uses a subclass of `Error` called `DatabaseError`. 1. I _think_ it was added around Dec 2019: [commit](https://github.com/brianc/node-postgres/commit/fa44905b3068ccd289ed7f7ee733d4cd94cc3de9). 2. It was exported from...
hello, do you plan update code to es6 and typescript support?
I'm not sure if this is a bug in parsing, or if PG just doesn't give the data, but `22P02` errors could use more detail. An example: ``` error: invalid...