Skip to content

printing SendTxReturnCode in logs will be more readable#99

Merged
fernandezlautaro merged 2 commits intomainfrom
errorLogsImprovement
Apr 10, 2026
Merged

printing SendTxReturnCode in logs will be more readable#99
fernandezlautaro merged 2 commits intomainfrom
errorLogsImprovement

Conversation

@fernandezlautaro
Copy link
Copy Markdown
Collaborator

Description

When an invariant error pops up and one looks for logs either here or here you get resultsByCode printed with the numeric value insted of the enum, not fast to read

  "resultsByCode": {
    "1": [
      {
        "code": 1,
        "error": "",
        "res": {}
      }
    ],
    "5": [
      {
        "code": 5,
        "error": "RPC call failed: TX_REPLAY_ATTACK",
        "res": {}
      },
      {
        "code": 5,
        "error": "RPC call failed: TX_REPLAY_ATTACK",
        "res": {}
      }
    ]
  },
  "err": "found contradictions in nodes replies on SendTransaction: got success and severe error",

This fix will make those resultsByCode print in the following shape:

  "resultsByCode": {
    "Successful": [
      {
        "code": "Successful",
        "error": "",
        "res": {}
      }
    ],
    "Unknown": [
      {
        "code": "Unknown",
        "error": "RPC call failed: TX_REPLAY_ATTACK",
        "res": {}
      },
      {
        "code": "Unknown",
        "error": "RPC call failed: TX_REPLAY_ATTACK",
        "res": {}
      }
    ]
  },
  "err": "found contradictions in nodes replies on SendTransaction: got success and severe error",

Requires Dependencies

Resolves Dependencies

@github-actions
Copy link
Copy Markdown

👋 fernandezlautaro, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 10, 2026

✅ API Diff Results - github.com/smartcontractkit/chainlink-framework/multinode

✅ Compatible Changes (1)

SendTxReturnCode (1)
  • MarshalText — ➕ Added

📄 View full apidiff report

@fernandezlautaro fernandezlautaro enabled auto-merge (squash) April 10, 2026 13:53
@fernandezlautaro fernandezlautaro merged commit c3b9c66 into main Apr 10, 2026
24 checks passed
@fernandezlautaro fernandezlautaro deleted the errorLogsImprovement branch April 10, 2026 14:01
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