Skip to content

Conversation

tejasbadadare
Copy link
Contributor

Summary

  • Better parsing and error handling.
  • Split up the monolithic parsing code. Now each layer of the payload (e.g. update, feed, channel) is responsible for its own deserialization logic.

Rationale

  • This lets us return granular error messages and gracefully handle bad payloads.

How has this been tested?

  • Current tests cover my changes
    • Existing parse test didn't regress
  • Added new tests
    • Added negative tests to check that granular error handling works
  • Manually tested the code

Copy link

vercel bot commented Aug 28, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
api-reference Ready Ready Preview Comment Aug 29, 2025 9:36pm
component-library Ready Ready Preview Comment Aug 29, 2025 9:36pm
developer-hub Ready Ready Preview Comment Aug 29, 2025 9:36pm
entropy-explorer Ready Ready Preview Comment Aug 29, 2025 9:36pm
insights Ready Ready Preview Comment Aug 29, 2025 9:36pm
proposals Ready Ready Preview Comment Aug 29, 2025 9:36pm
staking Ready Ready Preview Comment Aug 29, 2025 9:36pm

Comment on lines 35 to 36
if (channel_value == 0) {
new_invalid()
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the distinction between Channel::Invalid and EInvalidChannel?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good point! i'll remove Channel::Invalid

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.

2 participants