@headless-adminapp/app 1.4.38 → 1.4.41
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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@headless-adminapp/app",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.41",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"uuid": "11.0.3",
|
|
39
39
|
"yup": "^1.4.0"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "6e4f67738f3197b080207ee82662cafa3910fa57"
|
|
42
42
|
}
|
|
@@ -10,7 +10,9 @@ async function handleResponseError(response) {
|
|
|
10
10
|
if (response.headers.get('content-type')?.includes('application/json')) {
|
|
11
11
|
const data = await response.json();
|
|
12
12
|
if (data.error) {
|
|
13
|
-
|
|
13
|
+
const message = typeof data.error === 'string' ? data.error : data.error.message;
|
|
14
|
+
const code = data.error?.code;
|
|
15
|
+
throw new transport_1.HttpError(response.status, message, code);
|
|
14
16
|
}
|
|
15
17
|
}
|
|
16
18
|
throw new transport_1.HttpError(response.status, response.statusText);
|