Skip to content

fix(gbp): request categories whole in locations readMask (fixes discover 400)#727

Merged
arberx merged 1 commit into
mainfrom
fix/gbp-readmask-categories
Jun 21, 2026
Merged

fix(gbp): request categories whole in locations readMask (fixes discover 400)#727
arberx merged 1 commit into
mainfrom
fix/gbp-readmask-categories

Conversation

@arberx

@arberx arberx commented Jun 21, 2026

Copy link
Copy Markdown
Member

fix(gbp): request categories whole in the locations readMask (was a 400)

#724's expanded readMask added categories.additionalCategories.displayName,
but the Business Information locations.list API rejects a nested path into the
REPEATED additionalCategories array ("Invalid field mask provided", HTTP 400),
which broke gbp locations discover for every GBP project in production. (Metric
and keyword sync were unaffected — they operate on already-discovered locations,
not listLocations.) The mocked unit tests could not catch it because the mock
does not validate the readMask against the API.

Request categories WHOLE instead; it carries primaryCategory +
additionalCategories displayNames (verified against the live API, which then
returns the real owner content). The test now asserts categories is requested
and the invalid nested form is never used.

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com

🤖 Generated with Claude Code

… 400)

#724's expanded readMask added `categories.additionalCategories.displayName`,
but the Business Information locations.list API rejects a nested path into the
REPEATED additionalCategories array ("Invalid field mask provided", HTTP 400),
which broke `gbp locations discover` for every GBP project in production. (Metric
and keyword sync were unaffected — they operate on already-discovered locations,
not listLocations.) The mocked unit tests could not catch it because the mock
does not validate the readMask against the API.

Request `categories` WHOLE instead; it carries primaryCategory +
additionalCategories displayNames (verified against the live API, which then
returns the real owner content). The test now asserts `categories` is requested
and the invalid nested form is never used.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@arberx arberx merged commit d4a1b19 into main Jun 21, 2026
12 checks passed
@arberx arberx deleted the fix/gbp-readmask-categories branch June 21, 2026 23:19
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.

1 participant