-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Error object differs between pg and pg-native #938
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Milestone
Comments
Adding to the |
In the meantime, the generic error handler can simply accept the |
brianc
added a commit
that referenced
this issue
Jun 9, 2017
* Add client connectionString tests (#1310) * Remove redundant tests * Add client connectionString test Add test to ensure { connectionString } is respected as an argument to the client constructor * Add test for connection string property Also fixed some legacy require statements. * Normalize native error properties Map native error properties to the same property names we use for errors from the JS driver. Fixes #972 Fixes #938
I have this fixed on the 7.0 branch. |
brianc
added a commit
that referenced
this issue
Jun 9, 2017
* Add client connectionString tests (#1310) * Remove redundant tests * Add client connectionString test Add test to ensure { connectionString } is respected as an argument to the client constructor * Add test for connection string property Also fixed some legacy require statements. * Normalize native error properties Map native error properties to the same property names we use for errors from the JS driver. Fixes #972 Fixes #938
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The fix for #743 made me test a switch to pg-native again. However, I still found an API difference: the Error object. While the default pg library returns an error with properties
code
anddetail
, the parameters are named differently when using pg-native.require('pg')
:require('pg').native
:This makes it hard to do proper error handling. Especially the
code
property is probably used a lot for that.The text was updated successfully, but these errors were encountered: