-
Notifications
You must be signed in to change notification settings - Fork 455
Open
Description
Environment details
- OS: Linux
- PHP version: 8.5
- Package name and version: google/shopping-merchant-products : 1.3.1
Steps to reproduce
Update product customLabel0 on supplemetary feed with FieldMask. The protobuf sends bad query params on update mask
Code example
$attributes = new ProductAttributes()
->setCustomLabel0("Some value");
$productInput = new ProductInput()
->setName("accounts/{{accountId}}/productInputs/{{productId}}")
->setProductAttributes($attributes);
$updateMask = new FieldMask()
->setPaths(['product_attributes.custom_label_0']);
$request = new UpdateProductInputRequest()
->setDataSource("accounts{{accountId}}/dataSources/{{dataSourceId}}")
->setProductInput($productInput)
->setUpdateMask($updateMask);
$client->updateProductInput($request);
We get this error
{
"reason": "invalid",
"domain": "merchantapi.googleapis.com",
"errorInfoMetadata": {
"FIELD_LOCATION": "updateMask.paths[0]",
"PATHS": "[product_attributes.custom_label0]",
"REASON": "INVALID_FIELD_MASK_PATH"
},
"message": "[updateMask.paths[0]] Invalid field paths: [product_attribu
tes.custom_label0]",
"code": 3,
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.googleapis.com\/google.rpc.ErrorInfo",
"reason": "invalid",
"domain": "merchantapi.googleapis.com",
"metadata": {
"FIELD_LOCATION": "updateMask.paths[0]",
"PATHS": "[product_attributes.custom_label0]",
"REASON": "INVALID_FIELD_MASK_PATH"
}
}
]
} Lib should send product_attributes.custom_label_0 on query param updateMask
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels