Commit 1c10502
authored
better logging in case of jsonrpc errors (#199)
### 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.1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | | - | |
| 29 | + | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
0 commit comments