Open simplenotezy opened 2 weeks ago
OK - found the problem:
The customer ID should be without the customer/
prefix. I was initially simply looping through the return of const customerIds = (await client.listAccessibleCustomers(credentials.key)).resource_names
which automatically included the prefix. When the API returns a 404 the library cannot properly handle the error message, and that's when the Parser cannot parse input: expected a value
error occours
The library should properly handle 404 errors from the API
With the following code
const campaigns = await customer.query(
it fails with error:Full code example:
It appears to receive a 404 when issuing a request towards this URL:
https://googleads.googleapis.com/v16/customers/customers/XXX/googleAds:searchStream
When removing the
customers/
prefix, the query works as intended.Possible solutions: