Skip to content

fix(irohad): print genesis reading error details#5516

Merged
0x009922 merged 1 commit intohyperledger-iroha:mainfrom
0x009922:fix/read-genesis-error-details
Sep 30, 2025
Merged

fix(irohad): print genesis reading error details#5516
0x009922 merged 1 commit intohyperledger-iroha:mainfrom
0x009922:fix/read-genesis-error-details

Conversation

@0x009922
Copy link
Copy Markdown
Contributor

Makes printed error more informative and actionable.

Before the change:

failed to build a genesis block from /config/chain-aaa-genesis.json
failed to deserialize genesis spec from /config/chain-aaa-genesis.json
Error: Configuration error
├╴config path is specified by `--config` arg: /config/irohad.toml
│
╰─▶ Error occurred while reading genesis block
    ╰╴config origin: parameter `genesis.file` with value `/config/chain-aaa-genesis.json` set from environment variable `GENESIS`

After the change:

Error: Configuration error
├╴config path is specified by `--config` arg: ./test.toml
│
├─▶ Error occurred while reading genesis block
│   ╰╴config origin: parameter `genesis.file` with value `./chain-aaa-genesis.json` set from environment variable `GENESIS`
│
╰─▶ failed to deserialize genesis spec from ./chain-aaa-genesis.json
    ╰╴unknown variant `object`, expected one of `Domain`, `Account`, `AssetDefinition`, `Nft`, `Trigger` at line 265 column 16

@0x009922 0x009922 self-assigned this Sep 25, 2025
@0x009922 0x009922 added the Bug Something isn't working label Sep 25, 2025
@0x009922 0x009922 added the UI Something about the interface label Sep 25, 2025
@0x009922 0x009922 force-pushed the fix/read-genesis-error-details branch from ead15ea to ff686f7 Compare September 25, 2025 08:36
@s8sato s8sato self-assigned this Sep 26, 2025
@0x009922 0x009922 enabled auto-merge (squash) September 30, 2025 02:01
Signed-off-by: quacumque <quacumque@fastmail.jp>
@0x009922 0x009922 force-pushed the fix/read-genesis-error-details branch from ff686f7 to cde5a4a Compare September 30, 2025 02:01
@0x009922 0x009922 merged commit 884f870 into hyperledger-iroha:main Sep 30, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working UI Something about the interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants