diff --git a/utils/errorwithcode.go b/utils/errorwithcode.go index 5419ec9b..055869c5 100644 --- a/utils/errorwithcode.go +++ b/utils/errorwithcode.go @@ -69,7 +69,7 @@ func IsErrMatch(err error, strCode string, strList []string) (isMatch bool) { if strCode == "" || codeErr.Code() == strCode { isMatch = len(strList) == 0 for _, v := range strList { - if strings.Index(codeErr.ErrMsg(), v) > 0 { + if strings.Index(codeErr.ErrMsg(), v) >= 0 { isMatch = true break }