@aws-sdk/client-account 3.180.0 → 3.181.0
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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.181.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.180.0...v3.181.0) (2022-09-29)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **clients:** make parseErrorBody async ([#3999](https://github.com/aws/aws-sdk-js-v3/issues/3999)) ([2558c93](https://github.com/aws/aws-sdk-js-v3/commit/2558c93c050357ac6dc47aa0452b15b12ebfd676))
|
|
12
|
+
* **clients:** populate message field when parsing errors ([#3995](https://github.com/aws/aws-sdk-js-v3/issues/3995)) ([02e47f1](https://github.com/aws/aws-sdk-js-v3/commit/02e47f14397ae0a5d2e2883350d038b307fdcdb4))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
6
18
|
# [3.180.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.179.0...v3.180.0) (2022-09-27)
|
|
7
19
|
|
|
8
20
|
**Note:** Version bump only for package @aws-sdk/client-account
|
|
@@ -134,7 +134,7 @@ exports.deserializeAws_restJson1DeleteAlternateContactCommand = deserializeAws_r
|
|
|
134
134
|
const deserializeAws_restJson1DeleteAlternateContactCommandError = async (output, context) => {
|
|
135
135
|
const parsedOutput = {
|
|
136
136
|
...output,
|
|
137
|
-
body: await
|
|
137
|
+
body: await parseErrorBody(output.body, context),
|
|
138
138
|
};
|
|
139
139
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
140
140
|
switch (errorCode) {
|
|
@@ -180,7 +180,7 @@ exports.deserializeAws_restJson1GetAlternateContactCommand = deserializeAws_rest
|
|
|
180
180
|
const deserializeAws_restJson1GetAlternateContactCommandError = async (output, context) => {
|
|
181
181
|
const parsedOutput = {
|
|
182
182
|
...output,
|
|
183
|
-
body: await
|
|
183
|
+
body: await parseErrorBody(output.body, context),
|
|
184
184
|
};
|
|
185
185
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
186
186
|
switch (errorCode) {
|
|
@@ -226,7 +226,7 @@ exports.deserializeAws_restJson1GetContactInformationCommand = deserializeAws_re
|
|
|
226
226
|
const deserializeAws_restJson1GetContactInformationCommandError = async (output, context) => {
|
|
227
227
|
const parsedOutput = {
|
|
228
228
|
...output,
|
|
229
|
-
body: await
|
|
229
|
+
body: await parseErrorBody(output.body, context),
|
|
230
230
|
};
|
|
231
231
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
232
232
|
switch (errorCode) {
|
|
@@ -269,7 +269,7 @@ exports.deserializeAws_restJson1PutAlternateContactCommand = deserializeAws_rest
|
|
|
269
269
|
const deserializeAws_restJson1PutAlternateContactCommandError = async (output, context) => {
|
|
270
270
|
const parsedOutput = {
|
|
271
271
|
...output,
|
|
272
|
-
body: await
|
|
272
|
+
body: await parseErrorBody(output.body, context),
|
|
273
273
|
};
|
|
274
274
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
275
275
|
switch (errorCode) {
|
|
@@ -309,7 +309,7 @@ exports.deserializeAws_restJson1PutContactInformationCommand = deserializeAws_re
|
|
|
309
309
|
const deserializeAws_restJson1PutContactInformationCommandError = async (output, context) => {
|
|
310
310
|
const parsedOutput = {
|
|
311
311
|
...output,
|
|
312
|
-
body: await
|
|
312
|
+
body: await parseErrorBody(output.body, context),
|
|
313
313
|
};
|
|
314
314
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
315
315
|
switch (errorCode) {
|
|
@@ -464,6 +464,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
|
|
|
464
464
|
}
|
|
465
465
|
return {};
|
|
466
466
|
});
|
|
467
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
468
|
+
var _a;
|
|
469
|
+
const value = await parseBody(errorBody, context);
|
|
470
|
+
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
471
|
+
return value;
|
|
472
|
+
};
|
|
467
473
|
const loadRestJsonErrorCode = (output, data) => {
|
|
468
474
|
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
469
475
|
const sanitizeErrorCode = (rawValue) => {
|
|
@@ -151,7 +151,7 @@ var deserializeAws_restJson1DeleteAlternateContactCommandError = function (outpu
|
|
|
151
151
|
case 0:
|
|
152
152
|
_a = [__assign({}, output)];
|
|
153
153
|
_c = {};
|
|
154
|
-
return [4,
|
|
154
|
+
return [4, parseErrorBody(output.body, context)];
|
|
155
155
|
case 1:
|
|
156
156
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
157
157
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -223,7 +223,7 @@ var deserializeAws_restJson1GetAlternateContactCommandError = function (output,
|
|
|
223
223
|
case 0:
|
|
224
224
|
_a = [__assign({}, output)];
|
|
225
225
|
_c = {};
|
|
226
|
-
return [4,
|
|
226
|
+
return [4, parseErrorBody(output.body, context)];
|
|
227
227
|
case 1:
|
|
228
228
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
229
229
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -295,7 +295,7 @@ var deserializeAws_restJson1GetContactInformationCommandError = function (output
|
|
|
295
295
|
case 0:
|
|
296
296
|
_a = [__assign({}, output)];
|
|
297
297
|
_c = {};
|
|
298
|
-
return [4,
|
|
298
|
+
return [4, parseErrorBody(output.body, context)];
|
|
299
299
|
case 1:
|
|
300
300
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
301
301
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -362,7 +362,7 @@ var deserializeAws_restJson1PutAlternateContactCommandError = function (output,
|
|
|
362
362
|
case 0:
|
|
363
363
|
_a = [__assign({}, output)];
|
|
364
364
|
_c = {};
|
|
365
|
-
return [4,
|
|
365
|
+
return [4, parseErrorBody(output.body, context)];
|
|
366
366
|
case 1:
|
|
367
367
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
368
368
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -425,7 +425,7 @@ var deserializeAws_restJson1PutContactInformationCommandError = function (output
|
|
|
425
425
|
case 0:
|
|
426
426
|
_a = [__assign({}, output)];
|
|
427
427
|
_c = {};
|
|
428
|
-
return [4,
|
|
428
|
+
return [4, parseErrorBody(output.body, context)];
|
|
429
429
|
case 1:
|
|
430
430
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
431
431
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -585,6 +585,19 @@ var parseBody = function (streamBody, context) {
|
|
|
585
585
|
return {};
|
|
586
586
|
});
|
|
587
587
|
};
|
|
588
|
+
var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
589
|
+
var value;
|
|
590
|
+
var _a;
|
|
591
|
+
return __generator(this, function (_b) {
|
|
592
|
+
switch (_b.label) {
|
|
593
|
+
case 0: return [4, parseBody(errorBody, context)];
|
|
594
|
+
case 1:
|
|
595
|
+
value = _b.sent();
|
|
596
|
+
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
597
|
+
return [2, value];
|
|
598
|
+
}
|
|
599
|
+
});
|
|
600
|
+
}); };
|
|
588
601
|
var loadRestJsonErrorCode = function (output, data) {
|
|
589
602
|
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
590
603
|
var sanitizeErrorCode = function (rawValue) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-account",
|
|
3
3
|
"description": "AWS SDK for JavaScript Account Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.181.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@aws-crypto/sha256-browser": "2.0.0",
|
|
21
21
|
"@aws-crypto/sha256-js": "2.0.0",
|
|
22
|
-
"@aws-sdk/client-sts": "3.
|
|
22
|
+
"@aws-sdk/client-sts": "3.181.0",
|
|
23
23
|
"@aws-sdk/config-resolver": "3.178.0",
|
|
24
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
24
|
+
"@aws-sdk/credential-provider-node": "3.181.0",
|
|
25
25
|
"@aws-sdk/fetch-http-handler": "3.178.0",
|
|
26
26
|
"@aws-sdk/hash-node": "3.178.0",
|
|
27
27
|
"@aws-sdk/invalid-dependency": "3.178.0",
|