Skip to content

Commit

Permalink
bring back suppress sync warning on json rpc, removed in upgrading js… (
Browse files Browse the repository at this point in the history
  • Loading branch information
LukaszRozmej authored and kamilchodola committed Jan 16, 2024
1 parent 09b5526 commit bc54883
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Nethermind/Nethermind.JsonRpc/JsonRpcProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,10 @@ public async IAsyncEnumerable<JsonRpcResult> ProcessAsync(PipeReader reader, Jso
bool isSuccess = localErrorResponse is null;
if (!isSuccess)
{
if (_logger.IsWarn) _logger.Warn($"Error when handling {request} | {JsonSerializer.Serialize(localErrorResponse, EthereumJsonSerializer.JsonOptionsIndented)}");
if (localErrorResponse?.Error?.SuppressWarning == false)
{
if (_logger.IsWarn) _logger.Warn($"Error when handling {request} | {JsonSerializer.Serialize(localErrorResponse, EthereumJsonSerializer.JsonOptionsIndented)}");
}
Metrics.JsonRpcErrors++;
}
else
Expand Down

0 comments on commit bc54883

Please sign in to comment.