Skip to content

cc-economics crashes parsing current ccusage JSON (missing field month) #2178

@jengchakhrit-ck

Description

@jengchakhrit-ck

rtk v0.37.2, macOS (Apple Silicon, homebrew)

rtk cc-economics hard-fails parsing current ccusage JSON output.

Repro

$ rtk cc-economics
[info] ccusage not installed globally, fetching via npx...
rtk: Failed to fetch ccusage monthly data: Failed to parse ccusage JSON output: Invalid JSON structure for monthly data: missing field `month` at line 48 column 5

ccusage's monthly JSON shape has drifted from what rtk's parser expects (month field).

Expected

Adapt to the current ccusage schema, or degrade gracefully (skip the monthly section) instead of hard-failing the whole command.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions