docs(error): replace phantom FORMAT_INCOMPATIBLE with UNSUPPORTED_FEATURE in create_media_buy#4854
Merged
bokelley merged 2 commits intoMay 22, 2026
Conversation
…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
…-format-incompatible-phantom-code # Conflicts: # docs/media-buy/task-reference/create_media_buy.mdx
Contributor
There was a problem hiding this comment.
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_INCOMPATIBLEis genuinely absent fromstatic/schemas/source/enums/error-code.json(0 matches).UNSUPPORTED_FEATUREis present inenum(L22),enumDescriptions(L104), andenumMetadata(L229). The PR's premise is sound.- PR head has no
FORMAT_INCOMPATIBLEresidue anywhere increate_media_buy.mdx. - Single
UNSUPPORTED_FEATUREtable 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'spackages[0].capability_ids[j]pattern. The field-path normalization is the right shape. - No
static/schemas/source/**change, so schema-vs-docs coherence audit andmajorchangeset 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 fromerror-code.json. Kept out of scope per #4852, but the phantom-code sweep is worth running across all task-reference pages, not justcreate_media_buy. Same defect class — docs ship error codes that aren't in the published enum, SDKs treat them as unknown.
Safe to merge.
Contributor
|
The automated review encountered an issue (possibly reached max turns, timed out, or failed to post the final This is an automated message from the Argus AI review workflow. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #4852
FORMAT_INCOMPATIBLEappeared in the error table and two JSON examples indocs/media-buy/task-reference/create_media_buy.mdxbut was never present instatic/schemas/source/enums/error-code.json. Any SDK that validateserrors[].codeagainst 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 withUNSUPPORTED_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. TheFORMAT_INCOMPATIBLEtable row was removed and its v1-path guidance folded into the existingUNSUPPORTED_FEATURErow to avoid two rows with the same code causing agent-parseability ambiguity.fieldpaths in both v1 JSON examples updated topackages[0].format_ids[0](element-level) for consistency with the v2 example'spackages[0].capability_ids[0].Non-breaking justification: docs-only change.
FORMAT_INCOMPATIBLEwas never in the published enum, so no consumer could have been conformantly using it; removing it from docs and replacing with the validUNSUPPORTED_FEATUREcode 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 fromerror-code.json. Separately tracked phantom-code sweep is the right vehicle; kept out of scope per #4852.Pre-PR review:
UNSUPPORTED_FEATUREwithpackages[0].format_ids[0]; no new issuesFORMAT_INCOMPATIBLEfully removed; v1/v2 field paths consistent; phantom-code removal is correct and completeSession: https://claude.ai/code/session_01MVUhgB3tVFtW85wDQ1MATy
Generated by Claude Code