This commit is contained in:
withchao
2023-03-07 12:19:30 +08:00
parent 3fe9ee22fe
commit 4c5613084c
40 changed files with 315 additions and 297 deletions
+2 -4
View File
@@ -2,6 +2,7 @@ package callbackstruct
import (
"OpenIM/pkg/common/constant"
"OpenIM/pkg/errs"
"fmt"
)
@@ -45,10 +46,7 @@ type CommonCallbackResp struct {
func (c CommonCallbackResp) Parse() error {
if c.ActionCode != constant.NoError || c.ErrCode != constant.NoError {
newErr := constant.ErrCallback
newErr.ErrCode = c.ErrCode
newErr.DetailErrMsg = fmt.Sprintf("callback response error actionCode is %d, errCode is %d, errMsg is %s", c.ActionCode, c.ErrCode, c.ErrMsg)
return newErr.Wrap()
return errs.NewCodeError(int(c.ErrCode), "Callback").Wrap(fmt.Sprintf("callback response error actionCode is %d, errCode is %d, errMsg is %s", c.ActionCode, c.ErrCode, c.ErrMsg))
}
return nil
}