This commit is contained in:
withchao 2023-02-27 10:14:19 +08:00
parent 08fdac83fc
commit e513a09e45
2 changed files with 2 additions and 2 deletions

View File

@ -59,7 +59,7 @@ func rpcString(v interface{}) string {
}
type baseResp struct {
ErrCode int `json:"errCode"`
ErrCode int32 `json:"errCode"`
ErrMsg string `json:"errMsg"`
ErrDtl string `json:"errDtl"`
Data interface{} `json:"data"`

View File

@ -43,7 +43,7 @@ func (r *rpcCall[A, B, C, D, E]) Call(c *gin.Context, client func() (E, error))
} else {
cerr, ok := err.(errs.Coderr)
if ok {
resp.ErrCode = cerr.Code()
resp.ErrCode = int32(cerr.Code())
resp.ErrMsg = cerr.Msg()
resp.ErrDtl = cerr.Detail()
} else {