Skip to content

enums/error-code.json missing INVALID_PRICING_OPTION (and possibly INVALID_USAGE_DATA, DUPLICATE_REQUEST) used in report_usage docs #5892

Description

@MichielDean

Summary

INVALID_PRICING_OPTION is used in the official report_usage documentation — both in an example JSON response and in the error-handling table — but is absent from the canonical enums/error-code.json enum.

Evidence

Used in docs (docs/accounts/tasks/report_usage.mdx):

{
  "accepted": 1,
  "errors": [
    {
      "code": "INVALID_PRICING_OPTION",
      "message": "pricing_option_id 'po_unknown' does not exist on this account",
      "field": "usage[1].pricing_option_id"
    }
  ]
}

Also referenced in the error table:
| INVALID_PRICING_OPTION | pricing_option_id not found on this account | Verify pricing_option_id from the vendor's discovery response |

Missing from: enums/error-code.json (verified against current v3 schema — the code does not appear in the enum array)

Additional codes to check

The same report_usage error table also references INVALID_USAGE_DATA and DUPLICATE_REQUEST, which may also be missing from the enum. These should be audited at the same time.

Impact

  • Schema validation against enums/error-code.json will reject INVALID_PRICING_OPTION as an unknown code, despite it being a documented standard code.
  • Implementations following the docs are using a code that technically fails strict enum validation.

Fix

Add INVALID_PRICING_OPTION (and INVALID_USAGE_DATA, DUPLICATE_REQUEST if confirmed missing) to enums/error-code.json with appropriate descriptions and recovery classifications, consistent with their usage in report_usage.mdx.

Labels suggestion

bug, schema, accounts

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingclaude-triagedIssue has been triaged by the Claude Code triage routine. Remove to re-triage.priority:P1High priority: important bug or follow-up, not immediate P0schemaJSON Schema source-of-truth: definitions, codegen artifacts, validation, hygienespec / protocol

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions