修复RPC请求结果处理的BUG
This commit is contained in:
parent
eb2302301f
commit
27e02a3570
5
rpc.go
5
rpc.go
@ -332,6 +332,11 @@ func (r *request) Send(ctx *gin.Context, serviceFlag string, apiFlag string, par
|
||||
if !r.codeIsSuccess(code, successBusinessCodeList) {
|
||||
return fmt.Errorf("业务状态码异常 : %v -> %v", code, message)
|
||||
}
|
||||
|
||||
if nil == receiver {
|
||||
// 数据接收指针为 nil , 则认为状态码为成功既是成功
|
||||
return nil
|
||||
}
|
||||
if err = parseResponseBody(response.Header.Get("Content-Type"), []byte(data), receiver); nil != err {
|
||||
logDataList = append(logDataList, zap.Any("response_body_parse_fail_reason", err.Error()))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user