public void LogResponse(RpcResponseMessage responseMessage) { ResponseMessage = responseMessage; if (IsLogTraceEnabled()) { Log.LogTrace(GetRpcResponseLogMessage()); } if (HasError(responseMessage) && IsLogErrorEnabled()) { if (!IsLogTraceEnabled()) { Log.LogError(GetRpcResponseLogMessage()); } Log.LogError($"RPC Response Error: {responseMessage.Error.Message}"); } }
private bool HasError(RpcResponseMessage message) { return(message.Error != null && message.HasError); }