You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yea, that is a good point. I guess the current code base doesn't not have this situation. Your PR does not have this change, so I can't accept that. I will make this change.
I looked at this closer. The error will never be wrapped.
if err := validate.Struct(val); err != nil {
// Use a type assertion to get the real error value.
verrors, ok := err.(validator.ValidationErrors)
if !ok {
return err
}
Notice the error we are evaulating is coming from the validate.Struct call. This is not an error we are constructing and could be wrapped.
https://github.com/ardanlabs/service/blob/master/foundation/validate/validate.go#L47
Convert to the following code:
The text was updated successfully, but these errors were encountered: