@aws-sdk/core
Advanced tools
Comparing version
@@ -151,8 +151,11 @@ "use strict"; | ||
} | ||
if (data.code !== void 0) { | ||
return sanitizeErrorCode(data.code); | ||
if (data && typeof data === "object") { | ||
const codeKey = findKey(data, "code"); | ||
if (codeKey && data[codeKey] !== void 0) { | ||
return sanitizeErrorCode(data[codeKey]); | ||
} | ||
if (data["__type"] !== void 0) { | ||
return sanitizeErrorCode(data["__type"]); | ||
} | ||
} | ||
if (data["__type"] !== void 0) { | ||
return sanitizeErrorCode(data["__type"]); | ||
} | ||
}, "loadRestJsonErrorCode"); | ||
@@ -159,0 +162,0 @@ |
@@ -45,8 +45,11 @@ import { collectBodyString } from "../common"; | ||
} | ||
if (data.code !== undefined) { | ||
return sanitizeErrorCode(data.code); | ||
if (data && typeof data === "object") { | ||
const codeKey = findKey(data, "code"); | ||
if (codeKey && data[codeKey] !== undefined) { | ||
return sanitizeErrorCode(data[codeKey]); | ||
} | ||
if (data["__type"] !== undefined) { | ||
return sanitizeErrorCode(data["__type"]); | ||
} | ||
} | ||
if (data["__type"] !== undefined) { | ||
return sanitizeErrorCode(data["__type"]); | ||
} | ||
}; |
{ | ||
"name": "@aws-sdk/core", | ||
"version": "3.810.0", | ||
"version": "3.812.0", | ||
"description": "Core functions & classes shared by multiple AWS SDK clients.", | ||
@@ -5,0 +5,0 @@ "scripts": { |
88128
0.3%2086
0.29%