-
-
Notifications
You must be signed in to change notification settings - Fork 148
Open
Description
Description
When an error translated, original error message is omitted, and exactly predefined error is returned without details. So you getting for example "invalid field" without original error message from *pgconn.PgError where concrete field said.
Lines 27 to 30 in 1ffb5a7
| func (dialector Dialector) Translate(err error) error { | |
| if pgErr, ok := err.(*pgconn.PgError); ok { | |
| if translatedErr, found := errCodes[pgErr.Code]; found { | |
| return translatedErr |
The solution might be nested errors, to errors.Is() will work the same.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels