From 08fc776d88fdfa3dfa5607c219d1e144dcabe6dc Mon Sep 17 00:00:00 2001 From: ekonyukov Date: Mon, 8 Jul 2024 16:34:14 +0500 Subject: [PATCH] fix: error response data logging --- .../Middlewares/JsonRpcErrorLoggingMiddleware.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tochka.JsonRpc.Server/Middlewares/JsonRpcErrorLoggingMiddleware.cs b/src/Tochka.JsonRpc.Server/Middlewares/JsonRpcErrorLoggingMiddleware.cs index 2de5a29..8d1295a 100644 --- a/src/Tochka.JsonRpc.Server/Middlewares/JsonRpcErrorLoggingMiddleware.cs +++ b/src/Tochka.JsonRpc.Server/Middlewares/JsonRpcErrorLoggingMiddleware.cs @@ -31,7 +31,7 @@ public async Task InvokeAsync(HttpContext httpContext) var response = httpContext.GetJsonRpcResponse() as UntypedErrorResponse; if (response?.Error != null) { - logger.LogInformation("JsonRpc Error: Id = {ResponseId}, Code = {Code}, Message = {Message}, Data = {Data}", response.Id, response.Error.Code, response.Error.Message, response.Error.Data?.ToString()); + logger.LogInformation("JsonRpc Error: Id = {ResponseId}, Code = {Code}, Message = {Message}, Data = {Data}", response.Id, response.Error.Code, response.Error.Message, response.Error.Data?.RootElement.ToString()); } } }