-
Notifications
You must be signed in to change notification settings - Fork 134
*: errors revamp #4047
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
*: errors revamp #4047
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR revamps error messages across the eth2util, p2p, and tbls packages to make them more concise and consistent by removing redundant prefixes like "cannot", "failed to", and "finding/posting/loading" in favor of simpler verb forms.
Key Changes
- Standardizes error message format by removing "cannot" prefix from error messages
- Updates error messages to use verb forms (e.g., "marshal" instead of "failed to marshal")
- Consolidates duplicate error messages into shared error variables where appropriate
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tbls/tblsconv/tblsconv.go | Introduced shared error variable for invalid data length validation |
| tbls/herumi.go | Simplified error messages by removing "cannot" prefix across BLS operations |
| p2p/k1.go | Updated error messages for private key operations to be more descriptive |
| p2p/config_internal_test.go | Updated test assertion to match revised error message format |
| p2p/config.go | Improved clarity of IP address validation error messages |
| p2p/bootnode.go | Enhanced error messages for ENR parsing and relay URL validation |
| eth2util/types.go | Simplified JSON marshaling/unmarshaling error messages |
| eth2util/signing/signing.go | Removed "cannot" prefix from slot hash root error |
| eth2util/keystore/keystore.go | Improved clarity of key shares validation error message |
| eth2util/keymanager/keymanager_test.go | Updated test assertions to match revised error messages |
| eth2util/keymanager/keymanager.go | Simplified error messages for keymanager operations |
| eth2util/deposit/deposit_test.go | Updated test assertions to match revised error messages |
| eth2util/deposit/deposit.go | Simplified error messages for deposit data operations |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4047 +/- ##
=======================================
Coverage 53.80% 53.81%
=======================================
Files 242 242
Lines 39425 39425
=======================================
+ Hits 21214 21216 +2
- Misses 15967 15968 +1
+ Partials 2244 2241 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|



eth2util, p2p, tbls packages errors revamp with claude.
category: refactor
ticket: #3882