Skip to content

fix(mcms): improve error handling in confirmTransaction#594

Merged
gustavogama-cll merged 2 commits into
mainfrom
ggama/fix-mcms-improve-error-handling-confirmTransaction
Nov 26, 2025
Merged

fix(mcms): improve error handling in confirmTransaction#594
gustavogama-cll merged 2 commits into
mainfrom
ggama/fix-mcms-improve-error-handling-confirmTransaction

Conversation

@gustavogama-cll

Copy link
Copy Markdown
Contributor

No description provided.

@changeset-bot

changeset-bot Bot commented Nov 25, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5b55c7c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
chainlink-deployments-framework Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@gustavogama-cll gustavogama-cll force-pushed the ggama/fix-mcms-improve-error-handling-confirmTransaction branch 2 times, most recently from 725a971 to a01ba76 Compare November 25, 2025 14:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 improves error handling in the confirmTransaction function by adding better logging and more informative error messages when transaction confirmation fails.

Key changes:

  • Adds error logging before attempting to fetch transaction receipt
  • Enhances error messages to include receipt details for better debugging
  • Refactors receipt status check to handle successful transactions more explicitly

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
engine/cld/legacy/cli/mcmsv2/mcms_v2.go Enhanced error handling with additional logging and improved error messages in the transaction confirmation flow
.changeset/true-mammals-lie.md Added changeset documenting the error handling improvements

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

Comment thread engine/cld/legacy/cli/mcmsv2/mcms_v2.go Outdated
Comment thread engine/cld/legacy/cli/mcmsv2/mcms_v2.go Outdated
Comment thread engine/cld/legacy/cli/mcmsv2/mcms_v2.go Outdated
@gustavogama-cll gustavogama-cll force-pushed the ggama/fix-mcms-improve-error-handling-confirmTransaction branch from a01ba76 to 31228ac Compare November 25, 2025 18:55
@gustavogama-cll gustavogama-cll marked this pull request as ready for review November 25, 2025 18:56
@gustavogama-cll gustavogama-cll requested review from a team as code owners November 25, 2025 18:56
Copilot AI review requested due to automatic review settings November 25, 2025 18:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.


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

Comment thread engine/cld/legacy/cli/mcmsv2/mcms_v2.go
Comment thread engine/cld/legacy/cli/mcmsv2/mcms_v2.go Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings November 25, 2025 19:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.


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

}

return err
return fmt.Errorf("transaction %s failed (block number %v): %w", tx.Hash, rcpt.BlockNumber, err)

Copilot AI Nov 25, 2025

Copy link

Choose a reason for hiding this comment

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

The error message says 'transaction %s failed' but this return statement is reached both when the receipt status indicates failure (status != 1) and when revert decoding is unavailable. Consider making the message more specific, such as 'transaction %s reverted in block %v' to clarify this is a revert scenario, not a general failure.

Suggested change
return fmt.Errorf("transaction %s failed (block number %v): %w", tx.Hash, rcpt.BlockNumber, err)
return fmt.Errorf("transaction %s reverted in block %v (revert decoding unavailable): %w", tx.Hash, rcpt.BlockNumber, err)

Copilot uses AI. Check for mistakes.
@cl-sonarqube-production

Copy link
Copy Markdown

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@gustavogama-cll gustavogama-cll added this pull request to the merge queue Nov 26, 2025
Merged via the queue into main with commit 5936b3b Nov 26, 2025
16 checks passed
@gustavogama-cll gustavogama-cll deleted the ggama/fix-mcms-improve-error-handling-confirmTransaction branch November 26, 2025 02:49
github-merge-queue Bot pushed a commit that referenced this pull request Nov 26, 2025
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## chainlink-deployments-framework@0.68.2

### Patch Changes

-
[#588](#588)
[`d1febae`](d1febae)
Thanks [@gustavogama-cll](https://github.com/gustavogama-cll)! -
fix(mcms): make proposalContextProvider a required param of
BuildMCMSv2Cmd

-
[#595](#595)
[`95f96d9`](95f96d9)
Thanks [@finleydecker](https://github.com/finleydecker)! - Added -eth
flag to the evm nodes fund command. Example: users can now use "-eth 10"
to fund nodes up to 10 eth. Also added a new line separator to the
current balance log to improve readability.

-
[#594](#594)
[`5936b3b`](5936b3b)
Thanks [@gustavogama-cll](https://github.com/gustavogama-cll)! -
fix(mcms): improve error handling in confirmTransaction

---------

Co-authored-by: app-token-issuer-engops[bot] <144731339+app-token-issuer-engops[bot]@users.noreply.github.com>
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