Skip to content

Improve invalid config JSON error message with file path #102

@404-Page-Found

Description

@404-Page-Found

Task summary

Improve the error shown when config.json contains invalid JSON so users see a clear message that includes the config path and a hint on how to fix it.

Why this is a good first issue

This is a small UX improvement in one code path and does not require major architecture changes.

Suggested files or areas

  • src/config/store.ts
  • Any command paths that call loadConfig() / loadOrPromptConfig()
  • Tests covering malformed JSON handling

Acceptance criteria

  • Catch JSON parse failures from loadConfig() and return/throw a user-friendly error.
  • Include the config file path in the message.
  • Keep non-JSON errors unchanged unless necessary.
  • Add a regression test for malformed JSON input.

Extra context

Current behavior bubbles raw parse errors, which are technically correct but not very actionable for CLI users.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No fields configured for Feature.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions