-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
heimdall: better error logging for clerk/event-record/list nil respon…
…se (#9103) Users reported this error ``` [bor.heimdall] an error while trying fetching path=clerk/event-record/list attempt=5 error="unexpected end of JSON input" ``` Which may happen if: 1. Heimdall is behind and not sync-ed - for more info check maticnetwork/heimdall#993 2. Or the header time erigon is sending is far into the future The logs in this PR will help us see which of the 2 is the culprit but most likely it is 1. We will investigate further 2. if it ever happens. Changes: 1. Improves logging upon heimdall client retries - prints out the full url that failed. 2. Fixes a bug where the body was incorrectly checked if it is empty - `len(body) == 0` vs `body == nil` 3. Unit test for the bug regression 4. Adds a log to indicate to users to check their heimdall process if they run into this scenario since that may be the culprit Example output with new logs <img width="1465" alt="Screenshot 2023-12-29 at 20 16 57" src="https://github.com/ledgerwatch/erigon/assets/94537774/1ebfde68-aa93-41d6-889a-27bef5414f25">
- Loading branch information
Showing
2 changed files
with
36 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters