Describe the feature
As a user I would like to receive a friendly message when trying to include fields with foreignkey
{
"email":"duplicate@gmail.com"
}
expected message: field email already exists and cannot be duplicated
Motivation
When there is a duplicate field in the database, it warns that it cannot send duplicate data, however it does not specify which field, however if there are several fields with the parameter unique=true. we can't do a treatment for it
Related Issues
Comment From: saeidee
Currently, we are supporting ErrDuplicatedKey for unique key violations(which can be enabled by TranslateErr flag), however, if you want to have more details you can disable the flag and parse the error based on your used driver.
Comment From: saeidee
Closing the issue since it can be achieved by parsing the error.