Skip to content

Add supported-chains cmd & Improve Error Messages#330

Open
ejacquier wants to merge 21 commits intomainfrom
error-improvement
Open

Add supported-chains cmd & Improve Error Messages#330
ejacquier wants to merge 21 commits intomainfrom
error-improvement

Conversation

@ejacquier
Copy link
Copy Markdown
Contributor

@ejacquier ejacquier commented Mar 30, 2026

Supported Chains

  • Added cre workflow supported-chains command (sorted alphabetically)

📊 Error Handling Improvements

# Top Error (CSV) Count Improvement
1 no project settings file found 321 Now: clearer message ("no CRE project found") + suggests cre init, --project-root, or cd into project
2 Script not found "cre-compile" 303 Now: explains it comes from @chainlink/cre-sdk + suggests bun install / cre update
3 no RPC URLs found 178 Now: shows which target failed + suggests checking rpcs section and --supported-chains
4 failed to parse private key 159 Now: shows actual vs expected length (64 hex chars) + lists common mistakes
5 workflow.yaml: no such file or directory 155 Now: clearer message ("workflow settings file not found") + suggests cre workflow init or checking path

  - Shows the actual file being searched (project.yaml) and the directory searched from
  - Suggests: run from project dir, cre init, or --project-root

  2. Script not found cre-compile (cmd/common/compile.go)
  - Detects the specific Script not found + cre-compile pattern in bun output
  - Explains it comes from @chainlink/cre-sdk package
  - Suggests: bun install, check package.json deps, cre workflow init

  3. No RPC URLs found (cmd/workflow/simulate/simulate.go, simulator_utils.go)
  - Shows the actual selected target name in the error
  - Added --supported-chains flag to cre workflow simulate that lists all supported chain names
  - Error message points users to run cre workflow simulate --supported-chains

  4. Invalid private key (internal/ethkeys/keys.go, cmd/workflow/simulate/simulate.go)
  - Shows the actual key length after normalization (so users can see got 40 chars vs expected 64)
  - Clarifies 0x prefix is supported and stripped automatically
  - Lists real common issues: pasted address instead of key, extra quotes, truncated

  5. Workflow.yaml not found (internal/settings/settings_load.go)
  - Shows the resolved workflow directory path where it looked
  - Suggests: cre workflow init, add workflow.yaml manually, check folder argument
@ejacquier ejacquier requested a review from a team as a code owner March 30, 2026 15:50
@github-actions
Copy link
Copy Markdown

👋 ejacquier, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

ejacquier and others added 16 commits March 30, 2026 12:04
* Refactor: extract oauth from login

* Lint
* CLI AI UX improvements:   - Show required networks in cre templates list output
  - Add --json flag to cre templates list for machine-parseable output
  - Show actionable error with missing --rpc-url flags when cre init fails without TTY
  - Add --non-interactive flag to cre init for CI/CD usage
  - Only show tip footer on root help page, not subcommands
  - Make cre init respect -R/--project-root flag for output location

* update creinit

* fix tests

* gendoc

* comment fix
* Refactor: extract oauth from login

* Lint

* complete vault secrets browser OAuth (callback + exchange)

* Lint

* Update token exchage flow
  - Shows the actual file being searched (project.yaml) and the directory searched from
  - Suggests: run from project dir, cre init, or --project-root

  2. Script not found cre-compile (cmd/common/compile.go)
  - Detects the specific Script not found + cre-compile pattern in bun output
  - Explains it comes from @chainlink/cre-sdk package
  - Suggests: bun install, check package.json deps, cre workflow init

  3. No RPC URLs found (cmd/workflow/simulate/simulate.go, simulator_utils.go)
  - Shows the actual selected target name in the error
  - Added --supported-chains flag to cre workflow simulate that lists all supported chain names
  - Error message points users to run cre workflow simulate --supported-chains

  4. Invalid private key (internal/ethkeys/keys.go, cmd/workflow/simulate/simulate.go)
  - Shows the actual key length after normalization (so users can see got 40 chars vs expected 64)
  - Clarifies 0x prefix is supported and stripped automatically
  - Lists real common issues: pasted address instead of key, extra quotes, truncated

  5. Workflow.yaml not found (internal/settings/settings_load.go)
  - Shows the resolved workflow directory path where it looked
  - Suggests: cre workflow init, add workflow.yaml manually, check folder argument
@ejacquier ejacquier changed the title Improve Error messages Add supported-chains cmd & Improve Error Messages Mar 30, 2026
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