mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-01 07:35:58 +08:00
error
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user