@adobe/spacecat-shared-google-client 1.2.10 → 1.2.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [@adobe/spacecat-shared-google-client-v1.2.11](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-google-client-v1.2.10...@adobe/spacecat-shared-google-client-v1.2.11) (2024-10-08)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * gracefully handle api call in case site url is not defined ([#397](https://github.com/adobe/spacecat-shared/issues/397)) ([45924c8](https://github.com/adobe/spacecat-shared/commit/45924c8ef341b238647cb10ea927ab7c634007d2))
7
+
1
8
  # [@adobe/spacecat-shared-google-client-v1.2.10](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-google-client-v1.2.9...@adobe/spacecat-shared-google-client-v1.2.10) (2024-10-05)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/spacecat-shared-google-client",
3
- "version": "1.2.10",
3
+ "version": "1.2.11",
4
4
  "description": "Shared modules of the Spacecat Services - Google Client",
5
5
  "type": "module",
6
6
  "engines": {
package/src/index.js CHANGED
@@ -94,7 +94,7 @@ export default class GoogleClient {
94
94
  }
95
95
 
96
96
  async getOrganicSearchData(startDate, endDate, dimensions = ['date'], rowLimit = 1000, startRow = 0) {
97
- if (!isValidUrl(this.siteUrl) && !this.siteUrl.startsWith('sc-domain')) {
97
+ if (!isValidUrl(this.siteUrl) && !this.siteUrl?.startsWith('sc-domain')) {
98
98
  throw new Error(`Error retrieving organic search data from Google API: Invalid site URL in secret (${this.siteUrl})`);
99
99
  }
100
100
  if (!isValidDate(startDate) || !isValidDate(endDate)) {