diff --git a/utils/errorwithcode.go b/utils/errorwithcode.go index 8b1b2d6e..18b3eb64 100644 --- a/utils/errorwithcode.go +++ b/utils/errorwithcode.go @@ -58,6 +58,7 @@ func IsErrMatch(err error, strCode string, strList []string) (isMatch bool) { if err != nil { if codeErr, ok := err.(*ErrorWithCode); ok { if strCode == "" || codeErr.Code() == strCode { + isMatch = len(strList) == 0 for _, v := range strList { if strings.Index(codeErr.ErrMsg(), v) > 0 { isMatch = true