mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
Merge branch 'errcode' of github.com:OpenIMSDK/Open-IM-Server into errcode
This commit is contained in:
commit
22cea07266
@ -1,7 +1,6 @@
|
|||||||
package callbackstruct
|
package callbackstruct
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/errs"
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/errs"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -41,11 +40,12 @@ type CommonCallbackResp struct {
|
|||||||
ActionCode int `json:"actionCode"`
|
ActionCode int `json:"actionCode"`
|
||||||
ErrCode int32 `json:"errCode"`
|
ErrCode int32 `json:"errCode"`
|
||||||
ErrMsg string `json:"errMsg"`
|
ErrMsg string `json:"errMsg"`
|
||||||
|
ErrDlt string `json:"errDlt"`
|
||||||
}
|
}
|
||||||
|
|
||||||
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.ErrCode != errs.NoError {
|
||||||
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 errs.NewCodeError(int(c.ErrCode), c.ErrMsg).WithDetail(c.ErrDlt)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user