Skip to content

Conversation

@iuwqyir
Copy link
Contributor

@iuwqyir iuwqyir commented May 16, 2025

TL;DR

Improved error logging for nil block results in the RPC serializer.

What changed?

Enhanced the error handling in SerializeFullBlocks function by:

  1. Including the original error from rawBlock.Error in the log message
  2. Adding the original error details to the error message returned in the result

How to test?

  1. Trigger a scenario where a nil block result is returned from an RPC call
  2. Verify that the logs now include the original error information
  3. Confirm that the error message in the result contains the details from the original error

Why make this change?

This change provides more detailed error information when nil block results are encountered, making it easier to diagnose issues with RPC calls. The previous implementation only logged that a nil result was received without including the underlying error details, which limited troubleshooting capabilities.

Copy link
Contributor Author

iuwqyir commented May 16, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@iuwqyir iuwqyir marked this pull request as ready for review May 16, 2025 13:47
@iuwqyir iuwqyir merged commit 1c10502 into main May 16, 2025
5 checks passed
@iuwqyir iuwqyir deleted the 05-16-better_logging_in_case_of_jsonrpc_errors branch May 16, 2025 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants