Skip to content

fix(docs): replace phantom FORMAT_INCOMPATIBLE with UNSUPPORTED_FEATURE#4860

Merged
bokelley merged 1 commit into
mainfrom
bokelley/issue-4852
May 20, 2026
Merged

fix(docs): replace phantom FORMAT_INCOMPATIBLE with UNSUPPORTED_FEATURE#4860
bokelley merged 1 commit into
mainfrom
bokelley/issue-4852

Conversation

@bokelley

Copy link
Copy Markdown
Contributor

Summary

Closes #4852.

create_media_buy docs referenced FORMAT_INCOMPATIBLE in the error table and two JSON response examples, but the code is not defined in static/schemas/source/enums/error-code.json. SDKs that validate errors[].code against the published enum would reject responses built from the docs literally — sellers reading the spec either ship a non-conformant code or invent their own.

Surfaced during review of #4845 (added capability_ids[] to PackageRequest), where the new failure modes were deliberately routed to UNSUPPORTED_FEATURE to avoid inheriting the bug.

Change

Migrated all three references to UNSUPPORTED_FEATURE — the enum value whose semantics ("a requested feature or field is not supported by this seller") match the "format not in the product's accepted set" case exactly. The error-table row was also merged with the sibling UNSUPPORTED_FEATURE row added in #4845 (which covered the v2 capability_ids[] failure modes), so a single row now spans both v1 (format_ids[]) and v2 (capability_ids[]) format-mismatch cases.

Files

  • docs/media-buy/task-reference/create_media_buy.mdx — 1 table row merged, 2 JSON example bodies
  • .changeset/fix-format-incompatible-phantom-code.mdpatch

Test plan

  • CI green
  • Mintlify renders the merged error-table row cleanly

🤖 Generated with Claude Code

The `create_media_buy` docs referenced `FORMAT_INCOMPATIBLE` in the error
table and two JSON response examples, but the code was never defined in
`error-code.json`. SDKs that validate `errors[].code` against the published
enum would reject responses built from the docs literally.

Migrated all three references to `UNSUPPORTED_FEATURE` — semantics match
("a requested feature or field is not supported by this seller" = "format
not in the product's accepted set"). The error-table row was also merged
with the sibling `UNSUPPORTED_FEATURE` row added in #4845 (v2
`capability_ids[]` failure modes), so a single row now spans both v1
`format_ids[]` and v2 `capability_ids[]` mismatch cases.

Closes #4852.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

@aao-release-bot aao-release-bot 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.

LGTM. Real bug, clean fix — phantom enum value in publisher docs now points at a code that actually exists on the wire.

Things I checked

  • FORMAT_INCOMPATIBLE is absent from static/schemas/source/enums/error-code.json and from every other file in the tree post-merge (grep across docs/, mintlify-docs/, static/schemas/ returns nothing).
  • UNSUPPORTED_FEATURE is defined at static/schemas/source/enums/error-code.json:22 with enumDescriptions at L104 — "A requested feature or field is not supported by this seller. Recovery: correctable" — semantic match for the format-mismatch case is exact.
  • Three call sites migrated (error-table row + two JSON examples at L933, L1044). The L1060 case is unrelated and was already UNSUPPORTED_FEATURE from #4845.
  • Row merge at create_media_buy.mdx:921 is the right shape — single row now spans v1 (format_ids[]) and v2 (capability_ids[]) format-mismatch failure modes, which lines up with the packages[i].capability_ids row at L189 that already specifies UNSUPPORTED_FEATURE as the canonical code.
  • Changeset present (.changeset/fix-format-incompatible-phantom-code.md) and correctly typed patch — docs-only fix, no wire shape change.
  • Lineage cited (#4845, #4852) and accurate.

Follow-ups (non-blocking)

  • Test-plan checkbox "Mintlify renders the merged error-table row cleanly" is unchecked. The merged description cell is dense — worth a glance at the rendered Mintlify preview before assuming the table doesn't wrap awkwardly. Non-blocking; CI gate plus the surrounding rows being similarly verbose means the risk is cosmetic.

Safe to merge.

@bokelley bokelley merged commit c232af3 into main May 20, 2026
19 checks passed
@bokelley bokelley deleted the bokelley/issue-4852 branch May 20, 2026 18:46
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.

docs(error): FORMAT_INCOMPATIBLE referenced in error table but not defined in error-code.json enum

1 participant