Skip to content

chore: improve error diagnostics#1939

Open
SantiagoPittella wants to merge 8 commits intonextfrom
santiagopittella-monitor-improve-error-diagnostics
Open

chore: improve error diagnostics#1939
SantiagoPittella wants to merge 8 commits intonextfrom
santiagopittella-monitor-improve-error-diagnostics

Conversation

@SantiagoPittella
Copy link
Copy Markdown
Collaborator

closes #1931

When the Explorer or Faucet change their response format, the monitor now produce an error messages with the actual field that changed. The Explorer previously reported "missing field: block_number" when the field was present but had a different type. It now distinguishes between missing fields ("field 'block_number': not present in response") and type mismatches ("field 'block_number': expected u64-compatible value, got "abc""). Faucet deserialization errors now identify which endpoint failed.

@SantiagoPittella SantiagoPittella added no changelog This PR does not require an entry in the `CHANGELOG.md` file monitor Related to the network monitor labels Apr 13, 2026
Copy link
Copy Markdown
Collaborator

@JereSalo JereSalo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some tiny suggestions, the rest is perfect though.

Comment thread bin/network-monitor/src/faucet.rs
Comment thread bin/network-monitor/src/explorer.rs Outdated
Comment thread bin/network-monitor/src/explorer.rs
@Mirko-von-Leipzig
Copy link
Copy Markdown
Collaborator

Makes me wonder if we shouldn't switch to json for these..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

monitor Related to the network monitor no changelog This PR does not require an entry in the `CHANGELOG.md` file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Monitor: Improve error diagnostics when external service responses change

4 participants