Skip to content

fix(schema): add missing error codes to enums/error-code.json - #5982

Open
garvitkaushik-123 wants to merge 1 commit into
adcontextprotocol:mainfrom
garvitkaushik-123:fix/add-missing-error-codes
Open

fix(schema): add missing error codes to enums/error-code.json#5982
garvitkaushik-123 wants to merge 1 commit into
adcontextprotocol:mainfrom
garvitkaushik-123:fix/add-missing-error-codes

Conversation

@garvitkaushik-123

Copy link
Copy Markdown
Contributor

Summary

  • Adds five error codes to enums/error-code.json that are already referenced in documentation and server implementation but were absent from the canonical enum:
    • INVALID_PRICING_OPTION — used in report_usage.mdx, create_media_buy.mdx, and report-usage-response.json examples
    • INVALID_USAGE_DATA — used in report_usage.mdx error table and task-handlers.ts validation logic
    • DUPLICATE_REQUEST — used in report_usage.mdx error table
    • TARGETING_TOO_NARROW — used in create_media_buy.mdx error table
    • CREATIVE_ID_EXISTS — used in create_media_buy.mdx and update_media_buy.mdx error tables
  • Each code includes enumDescriptions (prose with recovery classification) and enumMetadata (structured recovery + suggestion) so SDKs can consume them like any other standard code

Closes #5892

Test plan

  • JSON is valid (python3 -c "import json; json.load(...)")
  • All 97 enum values have matching enumDescriptions and enumMetadata entries (no orphans in either direction)
  • CI schema validation passes
  • Changeset included for patch release

INVALID_PRICING_OPTION, INVALID_USAGE_DATA, DUPLICATE_REQUEST,
TARGETING_TOO_NARROW, and CREATIVE_ID_EXISTS were used in docs and
server code but absent from the canonical enum. Adds enum values,
enumDescriptions, and enumMetadata recovery classifications for all
five.

Closes adcontextprotocol#5892

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Argus is not auto-reviewing this PR because it modifies protected paths that require human review (static/schemas/source/enums/error-code.json). A human reviewer should review and merge this PR; Argus will resume on subsequent PRs once these changes land on main.

@bokelley bokelley left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for chasing the drift. This cannot land as a 3.1 patch: #5892 explicitly deferred the error-vocabulary decision to 3.2, and DUPLICATE_REQUEST was rejected in that disposition. The current branch also fails the drift-disposition checks. Please rework this against the recorded 3.2 vocabulary decision, remove rejected codes, and update the canonical docs and enum together rather than treating all current prose references as normative.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants