Skip to content

docs(error): replace phantom FORMAT_INCOMPATIBLE with UNSUPPORTED_FEATURE in create_media_buy#4854

Merged
bokelley merged 2 commits into
mainfrom
claude/issue-4852-fix-format-incompatible-phantom-code
May 22, 2026
Merged

docs(error): replace phantom FORMAT_INCOMPATIBLE with UNSUPPORTED_FEATURE in create_media_buy#4854
bokelley merged 2 commits into
mainfrom
claude/issue-4852-fix-format-incompatible-phantom-code

Conversation

@bokelley

Copy link
Copy Markdown
Contributor

Closes #4852

FORMAT_INCOMPATIBLE appeared in the error table and two JSON examples in docs/media-buy/task-reference/create_media_buy.mdx but was never present in static/schemas/source/enums/error-code.json. Any SDK that validates errors[].code against the published enum would treat seller responses using this code as unknown — falling back to unstructured recovery, which defeats the point of the error vocabulary. Replaced with UNSUPPORTED_FEATURE (the code already used for the v2/capability_ids[] path) so the v1 and v2 format-mismatch paths use the same code with identical recovery semantics. The FORMAT_INCOMPATIBLE table row was removed and its v1-path guidance folded into the existing UNSUPPORTED_FEATURE row to avoid two rows with the same code causing agent-parseability ambiguity. field paths in both v1 JSON examples updated to packages[0].format_ids[0] (element-level) for consistency with the v2 example's packages[0].capability_ids[0].

Non-breaking justification: docs-only change. FORMAT_INCOMPATIBLE was never in the published enum, so no consumer could have been conformantly using it; removing it from docs and replacing with the valid UNSUPPORTED_FEATURE code closes the divergence without any schema delta. Existing clients unaffected.

Known follow-up (out of scope): Three other error codes in the same table — TARGETING_TOO_NARROW, INVALID_PRICING_OPTION, CREATIVE_ID_EXISTS — are also absent from error-code.json. Separately tracked phantom-code sweep is the right vehicle; kept out of scope per #4852.

Pre-PR review:

  • code-reviewer: approved — all blockers resolved; both v1 examples now use UNSUPPORTED_FEATURE with packages[0].format_ids[0]; no new issues
  • docs-expert: approved — FORMAT_INCOMPATIBLE fully removed; v1/v2 field paths consistent; phantom-code removal is correct and complete

Triage-managed PR. This bot does not currently iterate on
review comments or PR conversation threads (only on the source
issue). To unblock:

  • Push fixup commits directly: gh pr checkout <num>
    fix → push.
  • Or re-trigger: comment /triage execute on the source
    issue.

See #3121
for context.

Session: https://claude.ai/code/session_01MVUhgB3tVFtW85wDQ1MATy


Generated by Claude Code

…TURE in create_media_buy

FORMAT_INCOMPATIBLE appeared in the error table and two JSON examples in
create_media_buy.mdx but was never present in error-code.json. SDKs
validating errors[].code against the enum would treat it as unknown,
defeating structured recovery.

Fixes: remove FORMAT_INCOMPATIBLE row; fold v1-path guidance into the
existing UNSUPPORTED_FEATURE row (which already covers the v2/capability_ids
path); replace FORMAT_INCOMPATIBLE with UNSUPPORTED_FEATURE in both JSON
examples; update field path in both v1 examples to packages[0].format_ids[0]
for element-level precision, consistent with the v2 example's
packages[0].capability_ids[0].

Closes #4852. Surfaced during review of #4845.

https://claude.ai/code/session_01MVUhgB3tVFtW85wDQ1MATy
@bokelley bokelley added the claude-triaged Issue has been triaged by the Claude Code triage routine. Remove to re-triage. label May 20, 2026
…-format-incompatible-phantom-code

# Conflicts:
#	docs/media-buy/task-reference/create_media_buy.mdx
@bokelley bokelley marked this pull request as ready for review May 22, 2026 18:11

@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. Phantom enum value removed from docs; v1 and v2 mismatch paths now share UNSUPPORTED_FEATURE, which is what makes the error vocabulary load-bearing for SDK consumers in the first place.

Things I checked

  • FORMAT_INCOMPATIBLE is genuinely absent from static/schemas/source/enums/error-code.json (0 matches). UNSUPPORTED_FEATURE is present in enum (L22), enumDescriptions (L104), and enumMetadata (L229). The PR's premise is sound.
  • PR head has no FORMAT_INCOMPATIBLE residue anywhere in create_media_buy.mdx.
  • Single UNSUPPORTED_FEATURE table row at L921 covers both v1 (format_ids[]) and v2 (capability_ids[]) paths — no duplicate-code agent-parseability ambiguity.
  • Both v1 JSON examples (L933, L1044) use field: packages[0].format_ids[0], element-level, matching the v2 example's packages[0].capability_ids[j] pattern. The field-path normalization is the right shape.
  • No static/schemas/source/** change, so schema-vs-docs coherence audit and major changeset rule don't fire. Changeset is a docs-only entry (empty frontmatter, prose-only) — appropriate for a docs PR.

Follow-ups (non-blocking — file as issues)

  • The PR body flags three more phantom codes in the same table (TARGETING_TOO_NARROW, INVALID_PRICING_OPTION, CREATIVE_ID_EXISTS) absent from error-code.json. Kept out of scope per #4852, but the phantom-code sweep is worth running across all task-reference pages, not just create_media_buy. Same defect class — docs ship error codes that aren't in the published enum, SDKs treat them as unknown.

Safe to merge.

@aao-release-bot

Copy link
Copy Markdown
Contributor

⚠️ Argus review could not complete

The automated review encountered an issue (possibly reached max turns, timed out, or failed to post the final gh pr review). A human reviewer should take this PR.

View workflow run

This is an automated message from the Argus AI review workflow.

@bokelley bokelley merged commit d4ab4dd into main May 22, 2026
20 checks passed
@bokelley bokelley deleted the claude/issue-4852-fix-format-incompatible-phantom-code branch May 22, 2026 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claude-triaged Issue has been triaged by the Claude Code triage routine. Remove to re-triage.

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

2 participants