Skip to content

fix(err): don't present non-ethereum error as an ethereum-style#13406

Merged
rvagg merged 1 commit into
masterfrom
rvagg/dont-eth-noneth
Oct 27, 2025
Merged

fix(err): don't present non-ethereum error as an ethereum-style#13406
rvagg merged 1 commit into
masterfrom
rvagg/dont-eth-noneth

Conversation

@rvagg
Copy link
Copy Markdown
Member

@rvagg rvagg commented Oct 27, 2025

Slight mistake #13389, all errors get wrapped up in this style, which isn't appropriate and we see things like this:

message execution failed (exit=[ErrIllegalArgument(16)], revert reason=[ERROR: revert reason is not cbor encoded bytes], vm error=[message failed with backtrace:
00: f01001 (method 5) -- invalid deadline 0 at epoch 151, expected 47 (16)

CBOR decode errors would get hidden with this change, but it's not something we expect to be seeing, and in the case of an expected reason where none appears that would be worth chasing up as an isolated case.

@rvagg rvagg requested review from Copilot and rjan90 October 27, 2025 09:53
@github-project-automation github-project-automation Bot moved this to 📌 Triage in FilOz Oct 27, 2025
Copy link
Copy Markdown
Contributor

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

This PR fixes error message formatting to avoid presenting non-Ethereum errors in an Ethereum-style format. Previously, all execution errors were displayed with a revert reason field, even when the error wasn't Ethereum-related, leading to misleading error messages that showed "ERROR: revert reason is not cbor encoded bytes" for non-Ethereum failures.

Key Changes:

  • Modified error message formatting to conditionally include revert reason only when present
  • Changed CBOR decoding error handling to silently skip non-Ethereum errors instead of displaying an error message
  • Refactored the reason string initialization from "none" to empty string with conditional assignment

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

Comment thread api/api_errors.go
@rjan90 rjan90 added the skip/changelog This change does not require CHANGELOG.md update label Oct 27, 2025
@rjan90 rjan90 moved this from 📌 Triage to 🔎 Awaiting Review in FilOz Oct 27, 2025
@github-project-automation github-project-automation Bot moved this from 🔎 Awaiting Review to ✔️ Approved by reviewer in FilOz Oct 27, 2025
@rvagg rvagg merged commit d562c52 into master Oct 27, 2025
101 of 103 checks passed
@rvagg rvagg deleted the rvagg/dont-eth-noneth branch October 27, 2025 10:45
@github-project-automation github-project-automation Bot moved this from ✔️ Approved by reviewer to 🎉 Done in FilOz Oct 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip/changelog This change does not require CHANGELOG.md update

Projects

Status: 🎉 Done

Development

Successfully merging this pull request may close these issues.

3 participants