Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TECH DEBT] Refactor errors #3724

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

[TECH DEBT] Refactor errors #3724

wants to merge 7 commits into from

Conversation

rob-maron
Copy link
Collaborator

@rob-maron rob-maron commented Oct 2, 2024

This PR:

Is the first step towards getting better logging/errors.

  • Switches everything from snafu to thiserror. This should get rid of the errors akin to "Libp2p-specific errors" and "Error in the Kademlia DHT"
  • Deduplicates some warnings/errors. Some errors will log and then return, where they got logged a second time. I plan to do more of this in a coming PR, along with adding more context where necessary
  • Removes unused errors and error variants

This PR does not:

  • Refine log levels
  • Change things to use anyhow anywhere
  • Apart from formatting, does not touch existing, in-use log messages (besides adding context) or log types.

Key places to review:

The only really important errors are the HotShot ones, so everything mentioning HotShotError

How to test this PR:

I've run this in the sequencer. I didn't see any unused error variants or anything

@rob-maron rob-maron marked this pull request as ready for review October 3, 2024 14:05
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