@osimatic/helpers-js 1.1.62 → 1.1.63

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.
Files changed (2) hide show
  1. package/http_client.js +6 -2
  2. package/package.json +1 -1
package/http_client.js CHANGED
@@ -345,9 +345,13 @@ class HTTPClient {
345
345
  }
346
346
  }
347
347
  else {
348
- HTTPClient.logRequestFailure(response, null);
348
+ let json = null;
349
+ if (response.headers.get('Content-Type') === 'application/json') {
350
+ json = await response.json();
351
+ }
352
+ HTTPClient.logRequestFailure(response, json);
349
353
  if (typeof errorCallback == 'function') {
350
- errorCallback(response);
354
+ errorCallback(response, json);
351
355
  }
352
356
  }
353
357
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osimatic/helpers-js",
3
- "version": "1.1.62",
3
+ "version": "1.1.63",
4
4
  "main": "main.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"