-
Notifications
You must be signed in to change notification settings - Fork 11
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
Print error on failed blockchain publish #327
Conversation
WalkthroughThe pull request introduces an enhancement to error logging in the Changes
The changes are minimal and focused on improving error logging without altering the core logic or functionality of the method. Tip CodeRabbit's docstrings feature is now available as part of our Early Access Program! Simply use the command Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 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
CodeRabbit Configuration File (
|
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: 0
🧹 Nitpick comments (1)
pkg/api/payer/service.go (1)
85-87
: LGTM! Consider adding more context to the error log.The error logging addition is good and matches the project's error handling pattern. However, consider enriching the log with additional context for better debugging:
-s.log.Error("error publishing payer envelopes", zap.Error(err)) +s.log.Error("error publishing payer envelopes to blockchain", + zap.Error(err), + zap.String("topic", payload.payload.TargetTopic().String()), +)This would help distinguish blockchain publishing errors from node publishing errors and provide more context for debugging.
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.
I think we should add some middleware that automatically logs failed status codes
I would argue that we should not leak internal errors to the client, but it is actually easier to debug for now.
Summary by CodeRabbit