Skip to content

Narrow broad except Exception in plot() #50

Description

@tschm

Subcategory: Error handling & CLI UX
Score: 8 → 10 (target)

src/pycharting/api/interface.py:248 wraps the entire plot body in a single broad except Exception, collapsing distinct failure modes (input validation vs. server startup vs. browser launch) into one generic {"status": "error", "error": str(e)}.

Suggested fix: catch DataValidationError separately from server-startup/runtime errors so the returned error (and the printed message) tells the user which stage failed and how to fix it.

Done when: plot distinguishes validation failures from server/runtime failures in its returned result.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions