@aws-sdk/client-iot-events-data 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 +12 -0
- package/dist-cjs/protocols/Aws_restJson1.js +18 -12
- package/dist-es/protocols/Aws_restJson1.js +25 -12
- package/package.json +3 -3
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-iot-events-data
|
|
@@ -291,7 +291,7 @@ exports.deserializeAws_restJson1BatchAcknowledgeAlarmCommand = deserializeAws_re
|
|
|
291
291
|
const deserializeAws_restJson1BatchAcknowledgeAlarmCommandError = async (output, context) => {
|
|
292
292
|
const parsedOutput = {
|
|
293
293
|
...output,
|
|
294
|
-
body: await
|
|
294
|
+
body: await parseErrorBody(output.body, context),
|
|
295
295
|
};
|
|
296
296
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
297
297
|
switch (errorCode) {
|
|
@@ -334,7 +334,7 @@ exports.deserializeAws_restJson1BatchDeleteDetectorCommand = deserializeAws_rest
|
|
|
334
334
|
const deserializeAws_restJson1BatchDeleteDetectorCommandError = async (output, context) => {
|
|
335
335
|
const parsedOutput = {
|
|
336
336
|
...output,
|
|
337
|
-
body: await
|
|
337
|
+
body: await parseErrorBody(output.body, context),
|
|
338
338
|
};
|
|
339
339
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
340
340
|
switch (errorCode) {
|
|
@@ -377,7 +377,7 @@ exports.deserializeAws_restJson1BatchDisableAlarmCommand = deserializeAws_restJs
|
|
|
377
377
|
const deserializeAws_restJson1BatchDisableAlarmCommandError = async (output, context) => {
|
|
378
378
|
const parsedOutput = {
|
|
379
379
|
...output,
|
|
380
|
-
body: await
|
|
380
|
+
body: await parseErrorBody(output.body, context),
|
|
381
381
|
};
|
|
382
382
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
383
383
|
switch (errorCode) {
|
|
@@ -420,7 +420,7 @@ exports.deserializeAws_restJson1BatchEnableAlarmCommand = deserializeAws_restJso
|
|
|
420
420
|
const deserializeAws_restJson1BatchEnableAlarmCommandError = async (output, context) => {
|
|
421
421
|
const parsedOutput = {
|
|
422
422
|
...output,
|
|
423
|
-
body: await
|
|
423
|
+
body: await parseErrorBody(output.body, context),
|
|
424
424
|
};
|
|
425
425
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
426
426
|
switch (errorCode) {
|
|
@@ -463,7 +463,7 @@ exports.deserializeAws_restJson1BatchPutMessageCommand = deserializeAws_restJson
|
|
|
463
463
|
const deserializeAws_restJson1BatchPutMessageCommandError = async (output, context) => {
|
|
464
464
|
const parsedOutput = {
|
|
465
465
|
...output,
|
|
466
|
-
body: await
|
|
466
|
+
body: await parseErrorBody(output.body, context),
|
|
467
467
|
};
|
|
468
468
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
469
469
|
switch (errorCode) {
|
|
@@ -506,7 +506,7 @@ exports.deserializeAws_restJson1BatchResetAlarmCommand = deserializeAws_restJson
|
|
|
506
506
|
const deserializeAws_restJson1BatchResetAlarmCommandError = async (output, context) => {
|
|
507
507
|
const parsedOutput = {
|
|
508
508
|
...output,
|
|
509
|
-
body: await
|
|
509
|
+
body: await parseErrorBody(output.body, context),
|
|
510
510
|
};
|
|
511
511
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
512
512
|
switch (errorCode) {
|
|
@@ -549,7 +549,7 @@ exports.deserializeAws_restJson1BatchSnoozeAlarmCommand = deserializeAws_restJso
|
|
|
549
549
|
const deserializeAws_restJson1BatchSnoozeAlarmCommandError = async (output, context) => {
|
|
550
550
|
const parsedOutput = {
|
|
551
551
|
...output,
|
|
552
|
-
body: await
|
|
552
|
+
body: await parseErrorBody(output.body, context),
|
|
553
553
|
};
|
|
554
554
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
555
555
|
switch (errorCode) {
|
|
@@ -592,7 +592,7 @@ exports.deserializeAws_restJson1BatchUpdateDetectorCommand = deserializeAws_rest
|
|
|
592
592
|
const deserializeAws_restJson1BatchUpdateDetectorCommandError = async (output, context) => {
|
|
593
593
|
const parsedOutput = {
|
|
594
594
|
...output,
|
|
595
|
-
body: await
|
|
595
|
+
body: await parseErrorBody(output.body, context),
|
|
596
596
|
};
|
|
597
597
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
598
598
|
switch (errorCode) {
|
|
@@ -635,7 +635,7 @@ exports.deserializeAws_restJson1DescribeAlarmCommand = deserializeAws_restJson1D
|
|
|
635
635
|
const deserializeAws_restJson1DescribeAlarmCommandError = async (output, context) => {
|
|
636
636
|
const parsedOutput = {
|
|
637
637
|
...output,
|
|
638
|
-
body: await
|
|
638
|
+
body: await parseErrorBody(output.body, context),
|
|
639
639
|
};
|
|
640
640
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
641
641
|
switch (errorCode) {
|
|
@@ -681,7 +681,7 @@ exports.deserializeAws_restJson1DescribeDetectorCommand = deserializeAws_restJso
|
|
|
681
681
|
const deserializeAws_restJson1DescribeDetectorCommandError = async (output, context) => {
|
|
682
682
|
const parsedOutput = {
|
|
683
683
|
...output,
|
|
684
|
-
body: await
|
|
684
|
+
body: await parseErrorBody(output.body, context),
|
|
685
685
|
};
|
|
686
686
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
687
687
|
switch (errorCode) {
|
|
@@ -730,7 +730,7 @@ exports.deserializeAws_restJson1ListAlarmsCommand = deserializeAws_restJson1List
|
|
|
730
730
|
const deserializeAws_restJson1ListAlarmsCommandError = async (output, context) => {
|
|
731
731
|
const parsedOutput = {
|
|
732
732
|
...output,
|
|
733
|
-
body: await
|
|
733
|
+
body: await parseErrorBody(output.body, context),
|
|
734
734
|
};
|
|
735
735
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
736
736
|
switch (errorCode) {
|
|
@@ -779,7 +779,7 @@ exports.deserializeAws_restJson1ListDetectorsCommand = deserializeAws_restJson1L
|
|
|
779
779
|
const deserializeAws_restJson1ListDetectorsCommandError = async (output, context) => {
|
|
780
780
|
const parsedOutput = {
|
|
781
781
|
...output,
|
|
782
|
-
body: await
|
|
782
|
+
body: await parseErrorBody(output.body, context),
|
|
783
783
|
};
|
|
784
784
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
785
785
|
switch (errorCode) {
|
|
@@ -1336,6 +1336,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
|
|
|
1336
1336
|
}
|
|
1337
1337
|
return {};
|
|
1338
1338
|
});
|
|
1339
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
1340
|
+
var _a;
|
|
1341
|
+
const value = await parseBody(errorBody, context);
|
|
1342
|
+
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
1343
|
+
return value;
|
|
1344
|
+
};
|
|
1339
1345
|
const loadRestJsonErrorCode = (output, data) => {
|
|
1340
1346
|
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1341
1347
|
const sanitizeErrorCode = (rawValue) => {
|
|
@@ -347,7 +347,7 @@ var deserializeAws_restJson1BatchAcknowledgeAlarmCommandError = function (output
|
|
|
347
347
|
case 0:
|
|
348
348
|
_a = [__assign({}, output)];
|
|
349
349
|
_c = {};
|
|
350
|
-
return [4,
|
|
350
|
+
return [4, parseErrorBody(output.body, context)];
|
|
351
351
|
case 1:
|
|
352
352
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
353
353
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -415,7 +415,7 @@ var deserializeAws_restJson1BatchDeleteDetectorCommandError = function (output,
|
|
|
415
415
|
case 0:
|
|
416
416
|
_a = [__assign({}, output)];
|
|
417
417
|
_c = {};
|
|
418
|
-
return [4,
|
|
418
|
+
return [4, parseErrorBody(output.body, context)];
|
|
419
419
|
case 1:
|
|
420
420
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
421
421
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -483,7 +483,7 @@ var deserializeAws_restJson1BatchDisableAlarmCommandError = function (output, co
|
|
|
483
483
|
case 0:
|
|
484
484
|
_a = [__assign({}, output)];
|
|
485
485
|
_c = {};
|
|
486
|
-
return [4,
|
|
486
|
+
return [4, parseErrorBody(output.body, context)];
|
|
487
487
|
case 1:
|
|
488
488
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
489
489
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -551,7 +551,7 @@ var deserializeAws_restJson1BatchEnableAlarmCommandError = function (output, con
|
|
|
551
551
|
case 0:
|
|
552
552
|
_a = [__assign({}, output)];
|
|
553
553
|
_c = {};
|
|
554
|
-
return [4,
|
|
554
|
+
return [4, parseErrorBody(output.body, context)];
|
|
555
555
|
case 1:
|
|
556
556
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
557
557
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -619,7 +619,7 @@ var deserializeAws_restJson1BatchPutMessageCommandError = function (output, cont
|
|
|
619
619
|
case 0:
|
|
620
620
|
_a = [__assign({}, output)];
|
|
621
621
|
_c = {};
|
|
622
|
-
return [4,
|
|
622
|
+
return [4, parseErrorBody(output.body, context)];
|
|
623
623
|
case 1:
|
|
624
624
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
625
625
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -687,7 +687,7 @@ var deserializeAws_restJson1BatchResetAlarmCommandError = function (output, cont
|
|
|
687
687
|
case 0:
|
|
688
688
|
_a = [__assign({}, output)];
|
|
689
689
|
_c = {};
|
|
690
|
-
return [4,
|
|
690
|
+
return [4, parseErrorBody(output.body, context)];
|
|
691
691
|
case 1:
|
|
692
692
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
693
693
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -755,7 +755,7 @@ var deserializeAws_restJson1BatchSnoozeAlarmCommandError = function (output, con
|
|
|
755
755
|
case 0:
|
|
756
756
|
_a = [__assign({}, output)];
|
|
757
757
|
_c = {};
|
|
758
|
-
return [4,
|
|
758
|
+
return [4, parseErrorBody(output.body, context)];
|
|
759
759
|
case 1:
|
|
760
760
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
761
761
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -823,7 +823,7 @@ var deserializeAws_restJson1BatchUpdateDetectorCommandError = function (output,
|
|
|
823
823
|
case 0:
|
|
824
824
|
_a = [__assign({}, output)];
|
|
825
825
|
_c = {};
|
|
826
|
-
return [4,
|
|
826
|
+
return [4, parseErrorBody(output.body, context)];
|
|
827
827
|
case 1:
|
|
828
828
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
829
829
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -891,7 +891,7 @@ var deserializeAws_restJson1DescribeAlarmCommandError = function (output, contex
|
|
|
891
891
|
case 0:
|
|
892
892
|
_a = [__assign({}, output)];
|
|
893
893
|
_c = {};
|
|
894
|
-
return [4,
|
|
894
|
+
return [4, parseErrorBody(output.body, context)];
|
|
895
895
|
case 1:
|
|
896
896
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
897
897
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -963,7 +963,7 @@ var deserializeAws_restJson1DescribeDetectorCommandError = function (output, con
|
|
|
963
963
|
case 0:
|
|
964
964
|
_a = [__assign({}, output)];
|
|
965
965
|
_c = {};
|
|
966
|
-
return [4,
|
|
966
|
+
return [4, parseErrorBody(output.body, context)];
|
|
967
967
|
case 1:
|
|
968
968
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
969
969
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1038,7 +1038,7 @@ var deserializeAws_restJson1ListAlarmsCommandError = function (output, context)
|
|
|
1038
1038
|
case 0:
|
|
1039
1039
|
_a = [__assign({}, output)];
|
|
1040
1040
|
_c = {};
|
|
1041
|
-
return [4,
|
|
1041
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1042
1042
|
case 1:
|
|
1043
1043
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1044
1044
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1113,7 +1113,7 @@ var deserializeAws_restJson1ListDetectorsCommandError = function (output, contex
|
|
|
1113
1113
|
case 0:
|
|
1114
1114
|
_a = [__assign({}, output)];
|
|
1115
1115
|
_c = {};
|
|
1116
|
-
return [4,
|
|
1116
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1117
1117
|
case 1:
|
|
1118
1118
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1119
1119
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1637,6 +1637,19 @@ var parseBody = function (streamBody, context) {
|
|
|
1637
1637
|
return {};
|
|
1638
1638
|
});
|
|
1639
1639
|
};
|
|
1640
|
+
var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1641
|
+
var value;
|
|
1642
|
+
var _a;
|
|
1643
|
+
return __generator(this, function (_b) {
|
|
1644
|
+
switch (_b.label) {
|
|
1645
|
+
case 0: return [4, parseBody(errorBody, context)];
|
|
1646
|
+
case 1:
|
|
1647
|
+
value = _b.sent();
|
|
1648
|
+
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
1649
|
+
return [2, value];
|
|
1650
|
+
}
|
|
1651
|
+
});
|
|
1652
|
+
}); };
|
|
1640
1653
|
var loadRestJsonErrorCode = function (output, data) {
|
|
1641
1654
|
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
1642
1655
|
var sanitizeErrorCode = function (rawValue) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-iot-events-data",
|
|
3
3
|
"description": "AWS SDK for JavaScript Iot Events Data 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",
|