From 9653ddea228a4e3c8a91c674824f8e86219c5fbb Mon Sep 17 00:00:00 2001 From: sodaRyCN <35725024+sodaRyCN@users.noreply.github.com> Date: Fri, 1 Sep 2023 16:46:46 +0800 Subject: [PATCH] log it when response is fail and no error (#652) * log when response is fail and no error --- common/remote/rpc/rpc_client.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/remote/rpc/rpc_client.go b/common/remote/rpc/rpc_client.go index d30826af..06d8b48e 100644 --- a/common/remote/rpc/rpc_client.go +++ b/common/remote/rpc/rpc_client.go @@ -505,6 +505,9 @@ func (r *RpcClient) Request(request rpc_request.IRequest, timeoutMills int64) (r currentErr = waitReconnect(timeoutMills, &retryTimes, request, errors.New(response.GetMessage())) continue } + if response != nil && !response.IsSuccess() { + logger.Warnf("%s request received fail response, error code: %d, result code: %d, message: [%s]", request.GetRequestType(), response.GetErrorCode(), response.GetResultCode(), response.GetMessage()) + } r.lastActiveTimestamp.Store(time.Now()) return response, nil }