Skip to content

verify --sources with missing/malformed file crashes with traceback #17

Description

@royalpinto007

Problem

verify --sources with a missing file raises uncaught FileNotFoundError, bad JSON raises uncaught JSONDecodeError: only ReceiptLoadError is caught in main.

Where

src/answerproof/cli.py (json.loads(Path(args.sources).read_text(...)) outside any try).

Acceptance

Add failing tests first for both cases, expecting exit 2 plus clean error: ... on stderr, no traceback. Then fix.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions