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
Summary
INVALID_PRICING_OPTIONis used in the officialreport_usagedocumentation — both in an example JSON response and in the error-handling table — but is absent from the canonicalenums/error-code.jsonenum.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_idnot found on this account | Verifypricing_option_idfrom the vendor's discovery response |Missing from:
enums/error-code.json(verified against current v3 schema — the code does not appear in theenumarray)Additional codes to check
The same
report_usageerror table also referencesINVALID_USAGE_DATAandDUPLICATE_REQUEST, which may also be missing from the enum. These should be audited at the same time.Impact
enums/error-code.jsonwill rejectINVALID_PRICING_OPTIONas an unknown code, despite it being a documented standard code.Fix
Add
INVALID_PRICING_OPTION(andINVALID_USAGE_DATA,DUPLICATE_REQUESTif confirmed missing) toenums/error-code.jsonwith appropriate descriptions and recovery classifications, consistent with their usage inreport_usage.mdx.Labels suggestion
bug,schema,accounts