@aws-sdk/client-iot-data-plane 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-iot-data-plane
|
|
@@ -176,7 +176,7 @@ exports.deserializeAws_restJson1DeleteThingShadowCommand = deserializeAws_restJs
|
|
|
176
176
|
const deserializeAws_restJson1DeleteThingShadowCommandError = async (output, context) => {
|
|
177
177
|
const parsedOutput = {
|
|
178
178
|
...output,
|
|
179
|
-
body: await
|
|
179
|
+
body: await parseErrorBody(output.body, context),
|
|
180
180
|
};
|
|
181
181
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
182
182
|
switch (errorCode) {
|
|
@@ -240,7 +240,7 @@ exports.deserializeAws_restJson1GetRetainedMessageCommand = deserializeAws_restJ
|
|
|
240
240
|
const deserializeAws_restJson1GetRetainedMessageCommandError = async (output, context) => {
|
|
241
241
|
const parsedOutput = {
|
|
242
242
|
...output,
|
|
243
|
-
body: await
|
|
243
|
+
body: await parseErrorBody(output.body, context),
|
|
244
244
|
};
|
|
245
245
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
246
246
|
switch (errorCode) {
|
|
@@ -290,7 +290,7 @@ exports.deserializeAws_restJson1GetThingShadowCommand = deserializeAws_restJson1
|
|
|
290
290
|
const deserializeAws_restJson1GetThingShadowCommandError = async (output, context) => {
|
|
291
291
|
const parsedOutput = {
|
|
292
292
|
...output,
|
|
293
|
-
body: await
|
|
293
|
+
body: await parseErrorBody(output.body, context),
|
|
294
294
|
};
|
|
295
295
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
296
296
|
switch (errorCode) {
|
|
@@ -351,7 +351,7 @@ exports.deserializeAws_restJson1ListNamedShadowsForThingCommand = deserializeAws
|
|
|
351
351
|
const deserializeAws_restJson1ListNamedShadowsForThingCommandError = async (output, context) => {
|
|
352
352
|
const parsedOutput = {
|
|
353
353
|
...output,
|
|
354
|
-
body: await
|
|
354
|
+
body: await parseErrorBody(output.body, context),
|
|
355
355
|
};
|
|
356
356
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
357
357
|
switch (errorCode) {
|
|
@@ -406,7 +406,7 @@ exports.deserializeAws_restJson1ListRetainedMessagesCommand = deserializeAws_res
|
|
|
406
406
|
const deserializeAws_restJson1ListRetainedMessagesCommandError = async (output, context) => {
|
|
407
407
|
const parsedOutput = {
|
|
408
408
|
...output,
|
|
409
|
-
body: await
|
|
409
|
+
body: await parseErrorBody(output.body, context),
|
|
410
410
|
};
|
|
411
411
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
412
412
|
switch (errorCode) {
|
|
@@ -452,7 +452,7 @@ exports.deserializeAws_restJson1PublishCommand = deserializeAws_restJson1Publish
|
|
|
452
452
|
const deserializeAws_restJson1PublishCommandError = async (output, context) => {
|
|
453
453
|
const parsedOutput = {
|
|
454
454
|
...output,
|
|
455
|
-
body: await
|
|
455
|
+
body: await parseErrorBody(output.body, context),
|
|
456
456
|
};
|
|
457
457
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
458
458
|
switch (errorCode) {
|
|
@@ -493,7 +493,7 @@ exports.deserializeAws_restJson1UpdateThingShadowCommand = deserializeAws_restJs
|
|
|
493
493
|
const deserializeAws_restJson1UpdateThingShadowCommandError = async (output, context) => {
|
|
494
494
|
const parsedOutput = {
|
|
495
495
|
...output,
|
|
496
|
-
body: await
|
|
496
|
+
body: await parseErrorBody(output.body, context),
|
|
497
497
|
};
|
|
498
498
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
499
499
|
switch (errorCode) {
|
|
@@ -712,6 +712,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
|
|
|
712
712
|
}
|
|
713
713
|
return {};
|
|
714
714
|
});
|
|
715
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
716
|
+
var _a;
|
|
717
|
+
const value = await parseBody(errorBody, context);
|
|
718
|
+
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
719
|
+
return value;
|
|
720
|
+
};
|
|
715
721
|
const loadRestJsonErrorCode = (output, data) => {
|
|
716
722
|
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
717
723
|
const sanitizeErrorCode = (rawValue) => {
|
|
@@ -221,7 +221,7 @@ var deserializeAws_restJson1DeleteThingShadowCommandError = function (output, co
|
|
|
221
221
|
case 0:
|
|
222
222
|
_a = [__assign({}, output)];
|
|
223
223
|
_c = {};
|
|
224
|
-
return [4,
|
|
224
|
+
return [4, parseErrorBody(output.body, context)];
|
|
225
225
|
case 1:
|
|
226
226
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
227
227
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -314,7 +314,7 @@ var deserializeAws_restJson1GetRetainedMessageCommandError = function (output, c
|
|
|
314
314
|
case 0:
|
|
315
315
|
_a = [__assign({}, output)];
|
|
316
316
|
_c = {};
|
|
317
|
-
return [4,
|
|
317
|
+
return [4, parseErrorBody(output.body, context)];
|
|
318
318
|
case 1:
|
|
319
319
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
320
320
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -390,7 +390,7 @@ var deserializeAws_restJson1GetThingShadowCommandError = function (output, conte
|
|
|
390
390
|
case 0:
|
|
391
391
|
_a = [__assign({}, output)];
|
|
392
392
|
_c = {};
|
|
393
|
-
return [4,
|
|
393
|
+
return [4, parseErrorBody(output.body, context)];
|
|
394
394
|
case 1:
|
|
395
395
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
396
396
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -480,7 +480,7 @@ var deserializeAws_restJson1ListNamedShadowsForThingCommandError = function (out
|
|
|
480
480
|
case 0:
|
|
481
481
|
_a = [__assign({}, output)];
|
|
482
482
|
_c = {};
|
|
483
|
-
return [4,
|
|
483
|
+
return [4, parseErrorBody(output.body, context)];
|
|
484
484
|
case 1:
|
|
485
485
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
486
486
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -563,7 +563,7 @@ var deserializeAws_restJson1ListRetainedMessagesCommandError = function (output,
|
|
|
563
563
|
case 0:
|
|
564
564
|
_a = [__assign({}, output)];
|
|
565
565
|
_c = {};
|
|
566
|
-
return [4,
|
|
566
|
+
return [4, parseErrorBody(output.body, context)];
|
|
567
567
|
case 1:
|
|
568
568
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
569
569
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -634,7 +634,7 @@ var deserializeAws_restJson1PublishCommandError = function (output, context) { r
|
|
|
634
634
|
case 0:
|
|
635
635
|
_a = [__assign({}, output)];
|
|
636
636
|
_c = {};
|
|
637
|
-
return [4,
|
|
637
|
+
return [4, parseErrorBody(output.body, context)];
|
|
638
638
|
case 1:
|
|
639
639
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
640
640
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -698,7 +698,7 @@ var deserializeAws_restJson1UpdateThingShadowCommandError = function (output, co
|
|
|
698
698
|
case 0:
|
|
699
699
|
_a = [__assign({}, output)];
|
|
700
700
|
_c = {};
|
|
701
|
-
return [4,
|
|
701
|
+
return [4, parseErrorBody(output.body, context)];
|
|
702
702
|
case 1:
|
|
703
703
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
704
704
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -940,6 +940,19 @@ var parseBody = function (streamBody, context) {
|
|
|
940
940
|
return {};
|
|
941
941
|
});
|
|
942
942
|
};
|
|
943
|
+
var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
944
|
+
var value;
|
|
945
|
+
var _a;
|
|
946
|
+
return __generator(this, function (_b) {
|
|
947
|
+
switch (_b.label) {
|
|
948
|
+
case 0: return [4, parseBody(errorBody, context)];
|
|
949
|
+
case 1:
|
|
950
|
+
value = _b.sent();
|
|
951
|
+
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
952
|
+
return [2, value];
|
|
953
|
+
}
|
|
954
|
+
});
|
|
955
|
+
}); };
|
|
943
956
|
var loadRestJsonErrorCode = function (output, data) {
|
|
944
957
|
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
945
958
|
var sanitizeErrorCode = function (rawValue) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-iot-data-plane",
|
|
3
3
|
"description": "AWS SDK for JavaScript Iot Data Plane 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",
|