@aliyun-obv/api 4.5.4 → 4.5.5
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/dist/api.es.js +2 -2
- package/package.json +1 -1
package/dist/api.es.js
CHANGED
|
@@ -376,9 +376,9 @@ function createNoXSS(htmlString) {
|
|
|
376
376
|
function structuredErrorMessage(message) {
|
|
377
377
|
try {
|
|
378
378
|
const parsed = JSON.parse(message);
|
|
379
|
-
const isStructured = parsed && typeof parsed === "object" && parsed.result && parsed.level && Array.isArray(parsed.
|
|
379
|
+
const isStructured = parsed && typeof parsed === "object" && parsed.result && parsed.level && Array.isArray(parsed.statusItem) && parsed.statusItem.length > 0 && parsed.statusItem.every((item) => item == null ? void 0 : item.code);
|
|
380
380
|
if (isStructured) {
|
|
381
|
-
return parsed.
|
|
381
|
+
return parsed.statusItem;
|
|
382
382
|
}
|
|
383
383
|
return false;
|
|
384
384
|
} catch (e) {
|
package/package.json
CHANGED