Skip to content

fix JSON log marshaling error in registerValidator#895

Open
dom-nie wants to merge 1 commit intoflashbots:developfrom
dom-nie:fix/json-log-register-validator
Open

fix JSON log marshaling error in registerValidator#895
dom-nie wants to merge 1 commit intoflashbots:developfrom
dom-nie:fix/json-log-register-validator

Conversation

@dom-nie
Copy link

@dom-nie dom-nie commented Mar 4, 2026

Summary

  • Remove *http.Request from logrus fields in registerValidator debug log
  • The http.Request.GetBody field (func() (io.ReadCloser, error)) causes json.Marshal to fail when running with -json log formatting, printing Failed to obtain reader to stderr and silently dropping the log entry
  • The relay url is already present on the logger context (set at line 35), so no useful information is lost

Closes #894

Remove *http.Request from logrus fields in registerValidator debug log.
The http.Request.GetBody field (func type) causes json.Marshal to fail
when running with -json log formatting, silently dropping the log entry.

Closes flashbots#894
Copilot AI review requested due to automatic review settings March 4, 2026 17:47
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes JSON-formatted logging in registerValidator by removing an unmarshalable *http.Request from logrus fields, preventing json.Marshal failures and dropped log entries when -json is enabled.

Changes:

  • Remove *http.Request from the debug log fields in registerValidator.
  • Keep the debug log message while relying on the existing per-relay url field for context.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

bug: JSON log format breaks on registerValidator due to *http.Request field containing func() type

2 participants