@griddo/cx 10.1.47 → 10.1.49

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@griddo/cx",
3
3
  "description": "Griddo SSG based on Gatsby",
4
- "version": "10.1.47",
4
+ "version": "10.1.49",
5
5
  "authors": [
6
6
  "Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
7
7
  "Diego M. Béjar <diego.bejar@secuoyas.com>",
@@ -68,7 +68,7 @@
68
68
  "react-helmet": "^6.0.0"
69
69
  },
70
70
  "devDependencies": {
71
- "@griddo/eslint-config-back": "^10.1.47",
71
+ "@griddo/eslint-config-back": "^10.1.49",
72
72
  "@types/babel__core": "^7.20.0",
73
73
  "@types/babel__preset-env": "^7.9.2",
74
74
  "@types/csvtojson": "^2.0.0",
@@ -116,5 +116,5 @@
116
116
  "publishConfig": {
117
117
  "access": "public"
118
118
  },
119
- "gitHead": "e751c2e4b181f088c65faed818494c39f6a5066e"
119
+ "gitHead": "c0420af93b9611000826e418ae9e04efc4b6268e"
120
120
  }
@@ -134,6 +134,10 @@ class SitesService {
134
134
  GET_DISTRIBUTOR_DATA: [prefix, suffix],
135
135
  } = ENDPOINTS;
136
136
  const { language: lang, site: id } = page;
137
+ if (!lang) {
138
+ console.log('----Not lang found', JSON.stringify(page));
139
+ process.exit(1);
140
+ }
137
141
  const response = await post<DistributorResponse>({
138
142
  endpoint: `${prefix}${id}${suffix}`,
139
143
  body,
package/src/utils/api.ts CHANGED
@@ -89,11 +89,12 @@ async function requestAPI<T extends APIResponses>(
89
89
  }
90
90
 
91
91
  if (attempt > parseInt(RETRY_ATTEMPTS)) {
92
- // console.log(`Max attempts ${RETRY_ATTEMPTS} reached`);
93
92
  console.log(
94
- `Max attempts ${RETRY_ATTEMPTS} reached\n- ${method.toUpperCase()} ${endpoint}\n- BODY: ${
95
- JSON.stringify(body)
96
- }\n- HEADERS: ${JSON.stringify(headers)})`
93
+ `Max attempts ${RETRY_ATTEMPTS} reached\n- ${method.toUpperCase()} ${endpoint}\n- BODY: ${JSON.stringify(
94
+ body
95
+ )}\n- HEADERS: ${JSON.stringify(headers)}\n- RESPONSE: ${
96
+ (error.response?.status, JSON.stringify(error.response?.data))
97
+ }`
97
98
  );
98
99
  process.exit(1);
99
100
  }