asab_webui_shell 25.1.10 → 25.1.12

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.
@@ -423,7 +423,17 @@ var Application = /*#__PURE__*/function (_Component) {
423
423
  // If the request was satisfied (application/json and presence of BigInt) return the modified object. If not, we return unchanged object
424
424
  return response;
425
425
  }, function (error) {
426
+ var _error$response, _error$response2;
426
427
  that.popNetworkingIndicator();
428
+ var contentType = error === null || error === void 0 || (_error$response = error.response) === null || _error$response === void 0 || (_error$response = _error$response.headers) === null || _error$response === void 0 ? void 0 : _error$response['content-type'];
429
+ // Check if the response content type is 'application/json' and data is a string
430
+ if (contentType !== null && contentType !== void 0 && contentType.startsWith('application/json') && typeof (error === null || error === void 0 || (_error$response2 = error.response) === null || _error$response2 === void 0 ? void 0 : _error$response2.data) === 'string') {
431
+ try {
432
+ error.response.data = JSON.parse(error.response.data);
433
+ } catch (e) {
434
+ console.error("Error parsing error of the error body:", e);
435
+ }
436
+ }
427
437
  return Promise.reject(error);
428
438
  });
429
439
  return axios;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asab_webui_shell",
3
- "version": "25.1.10",
3
+ "version": "25.1.12",
4
4
  "license": "BSD-3-Clause",
5
5
  "description": "TeskaLabs ASAB WebUI Shell Application",
6
6
  "contributors": [
@@ -43,7 +43,7 @@
43
43
  "@babel/runtime": "^7.22.11",
44
44
  "react": "^17.0.0",
45
45
  "react-dom": "^17.0.0",
46
- "axios": "^0.21.1",
46
+ "axios": "^1.8.4",
47
47
  "i18next": "^20.3.5",
48
48
  "react-i18next": "^11.8.12",
49
49
  "react-redux": "^7.2.0",