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 {
return nil
}
return err
}
utils.NotNilReplace(&req.GroupInfo.GroupID, resp.GroupID)

@ -14,9 +14,7 @@
package callbackstruct
import (
"github.com/OpenIMSDK/tools/errs"
)
import "github.com/OpenIMSDK/tools/errs"
type CommonCallbackReq struct {
SendID string `json:"sendID"`
@ -59,7 +57,7 @@ type CommonCallbackResp struct {
}
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 nil

Loading…
Cancel
Save