Skip to content

fix(pg): expose detail and hint on errors from the native client - #3780

Open
nigrosimone wants to merge 1 commit into
brianc:masterfrom
nigrosimone:fix-native-error-fields
Open

nigrosimone wants to merge 1 commit into
brianc:masterfrom
nigrosimone:fix-native-error-fields

Conversation

@nigrosimone

Copy link
Copy Markdown
Contributor

The native client copies the error fields libpq reports onto the error, renaming them to the names pg uses. Two are missing from that map: messageDetail and messageHint. So a duplicate key error has err.detail on pg and err.messageDetail on pg-native, and the same for hint.

The fix adds the two names to the map.

The parity test between the two clients now also compares a duplicate key error, which carries a detail, and a misspelt column, which carries a hint: it fails on master and passes here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant