@aws-sdk/core 3.973.6 → 3.973.7
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-cjs/index.js
CHANGED
|
@@ -2125,6 +2125,17 @@ class AwsRestXmlProtocol extends protocols.HttpBindingProtocol {
|
|
|
2125
2125
|
}
|
|
2126
2126
|
async handleError(operationSchema, context, response, dataObject, metadata) {
|
|
2127
2127
|
const errorIdentifier = loadRestXmlErrorCode(response, dataObject) ?? "Unknown";
|
|
2128
|
+
if (dataObject.Error && typeof dataObject.Error === "object") {
|
|
2129
|
+
for (const key of Object.keys(dataObject.Error)) {
|
|
2130
|
+
dataObject[key] = dataObject.Error[key];
|
|
2131
|
+
if (key.toLowerCase() === "message") {
|
|
2132
|
+
dataObject.message = dataObject.Error[key];
|
|
2133
|
+
}
|
|
2134
|
+
}
|
|
2135
|
+
}
|
|
2136
|
+
if (dataObject.RequestId && !metadata.requestId) {
|
|
2137
|
+
metadata.requestId = dataObject.RequestId;
|
|
2138
|
+
}
|
|
2128
2139
|
const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata);
|
|
2129
2140
|
const ns = schema.NormalizedSchema.of(errorSchema);
|
|
2130
2141
|
const message = dataObject.Error?.message ?? dataObject.Error?.Message ?? dataObject.message ?? dataObject.Message ?? "Unknown";
|
|
@@ -1787,6 +1787,17 @@ class AwsRestXmlProtocol extends protocols.HttpBindingProtocol {
|
|
|
1787
1787
|
}
|
|
1788
1788
|
async handleError(operationSchema, context, response, dataObject, metadata) {
|
|
1789
1789
|
const errorIdentifier = loadRestXmlErrorCode(response, dataObject) ?? "Unknown";
|
|
1790
|
+
if (dataObject.Error && typeof dataObject.Error === "object") {
|
|
1791
|
+
for (const key of Object.keys(dataObject.Error)) {
|
|
1792
|
+
dataObject[key] = dataObject.Error[key];
|
|
1793
|
+
if (key.toLowerCase() === "message") {
|
|
1794
|
+
dataObject.message = dataObject.Error[key];
|
|
1795
|
+
}
|
|
1796
|
+
}
|
|
1797
|
+
}
|
|
1798
|
+
if (dataObject.RequestId && !metadata.requestId) {
|
|
1799
|
+
metadata.requestId = dataObject.RequestId;
|
|
1800
|
+
}
|
|
1790
1801
|
const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata);
|
|
1791
1802
|
const ns = schema.NormalizedSchema.of(errorSchema);
|
|
1792
1803
|
const message = dataObject.Error?.message ?? dataObject.Error?.Message ?? dataObject.message ?? dataObject.Message ?? "Unknown";
|
|
@@ -51,6 +51,17 @@ export class AwsRestXmlProtocol extends HttpBindingProtocol {
|
|
|
51
51
|
}
|
|
52
52
|
async handleError(operationSchema, context, response, dataObject, metadata) {
|
|
53
53
|
const errorIdentifier = loadRestXmlErrorCode(response, dataObject) ?? "Unknown";
|
|
54
|
+
if (dataObject.Error && typeof dataObject.Error === "object") {
|
|
55
|
+
for (const key of Object.keys(dataObject.Error)) {
|
|
56
|
+
dataObject[key] = dataObject.Error[key];
|
|
57
|
+
if (key.toLowerCase() === "message") {
|
|
58
|
+
dataObject.message = dataObject.Error[key];
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
if (dataObject.RequestId && !metadata.requestId) {
|
|
63
|
+
metadata.requestId = dataObject.RequestId;
|
|
64
|
+
}
|
|
54
65
|
const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata);
|
|
55
66
|
const ns = NormalizedSchema.of(errorSchema);
|
|
56
67
|
const message = dataObject.Error?.message ?? dataObject.Error?.Message ?? dataObject.message ?? dataObject.Message ?? "Unknown";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/core",
|
|
3
|
-
"version": "3.973.
|
|
3
|
+
"version": "3.973.7",
|
|
4
4
|
"description": "Core functions & classes shared by multiple AWS SDK clients.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "yarn lint && concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
|
|
@@ -83,12 +83,12 @@
|
|
|
83
83
|
"dependencies": {
|
|
84
84
|
"@aws-sdk/types": "^3.973.1",
|
|
85
85
|
"@aws-sdk/xml-builder": "^3.972.4",
|
|
86
|
-
"@smithy/core": "^3.22.
|
|
86
|
+
"@smithy/core": "^3.22.1",
|
|
87
87
|
"@smithy/node-config-provider": "^4.3.8",
|
|
88
88
|
"@smithy/property-provider": "^4.2.8",
|
|
89
89
|
"@smithy/protocol-http": "^5.3.8",
|
|
90
90
|
"@smithy/signature-v4": "^5.3.8",
|
|
91
|
-
"@smithy/smithy-client": "^4.11.
|
|
91
|
+
"@smithy/smithy-client": "^4.11.2",
|
|
92
92
|
"@smithy/types": "^4.12.0",
|
|
93
93
|
"@smithy/util-base64": "^4.3.0",
|
|
94
94
|
"@smithy/util-middleware": "^4.2.8",
|