-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
fix(errors): improve error string output with codespace and code #24098
Conversation
📝 WalkthroughWalkthroughThis pull request updates the error formatting in the Changes
Sequence Diagram(s)(No sequence diagrams provided as the changes do not significantly modify control flow.) Suggested labels
Suggested reviewers
📜 Recent review detailsConfiguration used: .coderabbit.yml 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (1)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
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.
Actionable comments posted: 1
📜 Review details
Configuration used: .coderabbit.yml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
errors/errors.go
(1 hunks)errors/errors_test.go
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
`**/*.go`: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.
errors/errors.go
errors/errors_test.go
`**/*_test.go`: "Assess the unit test code assessing sufficient code coverage for the changes associated in the pull request"
**/*_test.go
: "Assess the unit test code assessing sufficient code coverage for the changes associated in the pull request"
errors/errors_test.go
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Summary
🔇 Additional comments (1)
errors/errors.go (1)
91-91
: LGTM! Enhanced error format provides better contextAdding the codespace and code in the formatted error string will make debugging easier by providing more context about where errors originate. This is a good improvement.
However, this change affects error string output in all places where
Error()
is called, including inABCIError()
. Make sure all test cases that expect specific error message formats are updated (as noted in the review oferrors_test.go
).
Could you open this against |
Error()
method inerrors.go
to include thecodespace
andcode
in the error string for better debugging and tracing:errors_test.go
to replace hardcoded code values with usage ofErrTxDecode.ABCICode()
for better test robustness.Author Checklist
fix
)CHANGELOG.md
Reviewers Checklist
Summary by CodeRabbit