Skip to content

Improve error messaging when building specs fails #475

@AlexD10S

Description

@AlexD10S

The current error message when building specs fails is unclear and does not provide enough context for debugging, we should improve this messaging to improve developer experience and troubleshooting.

How to replicate it

If I run pop build spec --chain ./wrong-chain-spec I get this error:

Error: IO error: command ["/templates_test/evm/target/release/parachain-template-node", "build-spec", "--chain", "./wrong-chain-spec", "--disable-default-bootnode"] exited with code 1

Caused by:
    command ["templates_test/evm/target/release/parachain-template-node", "build-spec", "--chain", "./wrong-chain-spec", "--disable-default-bootnode"] exited with code 1

While If I run

./target/release/parachain-template-node build-spec --chain ./wrong-chain-spec

I get a more clear one:

Error: Input("Error opening spec file `./c`: No such file or directory (os error 2)")

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions