fix(gbp): request categories whole in locations readMask (fixes discover 400)#727
Merged
Conversation
… 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>
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.
fix(gbp): request
categorieswhole 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 discoverfor every GBP project in production. (Metricand 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
categoriesWHOLE instead; it carries primaryCategory +additionalCategories displayNames (verified against the live API, which then
returns the real owner content). The test now asserts
categoriesis requestedand the invalid nested form is never used.
Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com
🤖 Generated with Claude Code