From e8909acd0067e0f83ca5f5e9820b7e301e001f6b Mon Sep 17 00:00:00 2001 From: gazebo Date: Fri, 12 Jul 2019 09:30:58 +0800 Subject: [PATCH] - fix bug in IsErrMatch --- utils/errorwithcode.go | 1 + 1 file changed, 1 insertion(+) 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