fix:fix the error parse

pull/1422/head
luhaoling 2 years ago
parent b7b049e4b1
commit 09f0fbda39

@ -69,6 +69,7 @@ func CallbackBeforeCreateGroup(ctx context.Context, req *group.CreateGroupReq) (
if err == errs.ErrCallbackContinue { if err == errs.ErrCallbackContinue {
return nil return nil
} }
return err return err
} }
utils.NotNilReplace(&req.GroupInfo.GroupID, resp.GroupID) utils.NotNilReplace(&req.GroupInfo.GroupID, resp.GroupID)

@ -14,9 +14,7 @@
package callbackstruct package callbackstruct
import ( import "github.com/OpenIMSDK/tools/errs"
"github.com/OpenIMSDK/tools/errs"
)
type CommonCallbackReq struct { type CommonCallbackReq struct {
SendID string `json:"sendID"` SendID string `json:"sendID"`
@ -59,7 +57,7 @@ type CommonCallbackResp struct {
} }
func (c CommonCallbackResp) Parse() error { func (c CommonCallbackResp) Parse() error {
if c.ActionCode != errs.NoError || c.ErrCode != errs.NoError { if c.ActionCode != errs.NoError || c.NextCode == 1 {
return errs.NewCodeError(int(c.ErrCode), c.ErrMsg).WithDetail(c.ErrDlt) return errs.NewCodeError(int(c.ErrCode), c.ErrMsg).WithDetail(c.ErrDlt)
} }
return nil return nil

Loading…
Cancel
Save