Skip to content

Display error message from coreutil.Unwrap* as well #164

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

Merged
merged 3 commits into from
Jun 3, 2025

Conversation

abicky
Copy link
Contributor

@abicky abicky commented Jun 3, 2025

This PR modifies the error message to include the error from coreutil.Unwrap* functions when a user runs some commands with an unexpected chain argument.
This improvement was suggested by Masa-san pointed out in the comment datachainlab/lcp-go#51 (comment).

Additionally, this PR includes some trivial changes.

Before

$ yrly tendermint keys list ibc1
2025/06/03 16:10:31 Chain "ibc1" is not a tendermint.Chain
$ yrly tendermint light init ibc1
-- snip --
2025/06/03 16:10:51 Chain "ibc1" is not a tendermint.Chain
-- snip --
$ yrly tendermint light init ibc0
2025/06/03 16:11:04 Chain "ibc0" is not a tendermint.Prover

After

$ yrly tendermint keys list ibc1
2025/06/03 16:09:37 Chain "ibc1" is not a tendermint.Chain: failed to unwrap chain: expected=*tendermint.Chain, actual=*ethereum.Chain
$ yrly tendermint light init ibc1
-- snip --
2025/06/03 16:07:52 Chain "ibc1" is not a tendermint.Chain: failed to unwrap chain: expected=*tendermint.Chain, actual=*ethereum.Chain
-- snip --
$ yrly tendermint light init ibc0
2025/06/03 16:09:13 Chain "ibc0" is not a tendermint.Prover: failed to unwrap prover: expected=*tendermint.Prover, actual=*mock.Prover

abicky added 3 commits June 3, 2025 16:01
Signed-off-by: Takeshi Arabiki <[email protected]>
This commit fixes the "open configs/demo: no such file or directory"
error when we run init-rly outside the tests/cases directory.

Signed-off-by: Takeshi Arabiki <[email protected]>
@abicky abicky requested a review from a team as a code owner June 3, 2025 07:11
Copy link
Contributor

@siburu siburu left a comment

Choose a reason for hiding this comment

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

@abicky LGTM, thank you!!!

@siburu siburu merged commit 4921b58 into hyperledger-labs:main Jun 3, 2025
9 checks passed
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.

2 participants