@aws-sdk/client-greengrassv2 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 +35 -29
- package/dist-es/protocols/Aws_restJson1.js +42 -29
- 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-greengrassv2
|
|
@@ -643,7 +643,7 @@ exports.deserializeAws_restJson1AssociateServiceRoleToAccountCommand = deseriali
|
|
|
643
643
|
const deserializeAws_restJson1AssociateServiceRoleToAccountCommandError = async (output, context) => {
|
|
644
644
|
const parsedOutput = {
|
|
645
645
|
...output,
|
|
646
|
-
body: await
|
|
646
|
+
body: await parseErrorBody(output.body, context),
|
|
647
647
|
};
|
|
648
648
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
649
649
|
switch (errorCode) {
|
|
@@ -680,7 +680,7 @@ exports.deserializeAws_restJson1BatchAssociateClientDeviceWithCoreDeviceCommand
|
|
|
680
680
|
const deserializeAws_restJson1BatchAssociateClientDeviceWithCoreDeviceCommandError = async (output, context) => {
|
|
681
681
|
const parsedOutput = {
|
|
682
682
|
...output,
|
|
683
|
-
body: await
|
|
683
|
+
body: await parseErrorBody(output.body, context),
|
|
684
684
|
};
|
|
685
685
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
686
686
|
switch (errorCode) {
|
|
@@ -726,7 +726,7 @@ exports.deserializeAws_restJson1BatchDisassociateClientDeviceFromCoreDeviceComma
|
|
|
726
726
|
const deserializeAws_restJson1BatchDisassociateClientDeviceFromCoreDeviceCommandError = async (output, context) => {
|
|
727
727
|
const parsedOutput = {
|
|
728
728
|
...output,
|
|
729
|
-
body: await
|
|
729
|
+
body: await parseErrorBody(output.body, context),
|
|
730
730
|
};
|
|
731
731
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
732
732
|
switch (errorCode) {
|
|
@@ -772,7 +772,7 @@ exports.deserializeAws_restJson1CancelDeploymentCommand = deserializeAws_restJso
|
|
|
772
772
|
const deserializeAws_restJson1CancelDeploymentCommandError = async (output, context) => {
|
|
773
773
|
const parsedOutput = {
|
|
774
774
|
...output,
|
|
775
|
-
body: await
|
|
775
|
+
body: await parseErrorBody(output.body, context),
|
|
776
776
|
};
|
|
777
777
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
778
778
|
switch (errorCode) {
|
|
@@ -833,7 +833,7 @@ exports.deserializeAws_restJson1CreateComponentVersionCommand = deserializeAws_r
|
|
|
833
833
|
const deserializeAws_restJson1CreateComponentVersionCommandError = async (output, context) => {
|
|
834
834
|
const parsedOutput = {
|
|
835
835
|
...output,
|
|
836
|
-
body: await
|
|
836
|
+
body: await parseErrorBody(output.body, context),
|
|
837
837
|
};
|
|
838
838
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
839
839
|
switch (errorCode) {
|
|
@@ -891,7 +891,7 @@ exports.deserializeAws_restJson1CreateDeploymentCommand = deserializeAws_restJso
|
|
|
891
891
|
const deserializeAws_restJson1CreateDeploymentCommandError = async (output, context) => {
|
|
892
892
|
const parsedOutput = {
|
|
893
893
|
...output,
|
|
894
|
-
body: await
|
|
894
|
+
body: await parseErrorBody(output.body, context),
|
|
895
895
|
};
|
|
896
896
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
897
897
|
switch (errorCode) {
|
|
@@ -940,7 +940,7 @@ exports.deserializeAws_restJson1DeleteComponentCommand = deserializeAws_restJson
|
|
|
940
940
|
const deserializeAws_restJson1DeleteComponentCommandError = async (output, context) => {
|
|
941
941
|
const parsedOutput = {
|
|
942
942
|
...output,
|
|
943
|
-
body: await
|
|
943
|
+
body: await parseErrorBody(output.body, context),
|
|
944
944
|
};
|
|
945
945
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
946
946
|
switch (errorCode) {
|
|
@@ -986,7 +986,7 @@ exports.deserializeAws_restJson1DeleteCoreDeviceCommand = deserializeAws_restJso
|
|
|
986
986
|
const deserializeAws_restJson1DeleteCoreDeviceCommandError = async (output, context) => {
|
|
987
987
|
const parsedOutput = {
|
|
988
988
|
...output,
|
|
989
|
-
body: await
|
|
989
|
+
body: await parseErrorBody(output.body, context),
|
|
990
990
|
};
|
|
991
991
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
992
992
|
switch (errorCode) {
|
|
@@ -1032,7 +1032,7 @@ exports.deserializeAws_restJson1DeleteDeploymentCommand = deserializeAws_restJso
|
|
|
1032
1032
|
const deserializeAws_restJson1DeleteDeploymentCommandError = async (output, context) => {
|
|
1033
1033
|
const parsedOutput = {
|
|
1034
1034
|
...output,
|
|
1035
|
-
body: await
|
|
1035
|
+
body: await parseErrorBody(output.body, context),
|
|
1036
1036
|
};
|
|
1037
1037
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1038
1038
|
switch (errorCode) {
|
|
@@ -1105,7 +1105,7 @@ exports.deserializeAws_restJson1DescribeComponentCommand = deserializeAws_restJs
|
|
|
1105
1105
|
const deserializeAws_restJson1DescribeComponentCommandError = async (output, context) => {
|
|
1106
1106
|
const parsedOutput = {
|
|
1107
1107
|
...output,
|
|
1108
|
-
body: await
|
|
1108
|
+
body: await parseErrorBody(output.body, context),
|
|
1109
1109
|
};
|
|
1110
1110
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1111
1111
|
switch (errorCode) {
|
|
@@ -1151,7 +1151,7 @@ exports.deserializeAws_restJson1DisassociateServiceRoleFromAccountCommand = dese
|
|
|
1151
1151
|
const deserializeAws_restJson1DisassociateServiceRoleFromAccountCommandError = async (output, context) => {
|
|
1152
1152
|
const parsedOutput = {
|
|
1153
1153
|
...output,
|
|
1154
|
-
body: await
|
|
1154
|
+
body: await parseErrorBody(output.body, context),
|
|
1155
1155
|
};
|
|
1156
1156
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1157
1157
|
switch (errorCode) {
|
|
@@ -1191,7 +1191,7 @@ exports.deserializeAws_restJson1GetComponentCommand = deserializeAws_restJson1Ge
|
|
|
1191
1191
|
const deserializeAws_restJson1GetComponentCommandError = async (output, context) => {
|
|
1192
1192
|
const parsedOutput = {
|
|
1193
1193
|
...output,
|
|
1194
|
-
body: await
|
|
1194
|
+
body: await parseErrorBody(output.body, context),
|
|
1195
1195
|
};
|
|
1196
1196
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1197
1197
|
switch (errorCode) {
|
|
@@ -1237,7 +1237,7 @@ exports.deserializeAws_restJson1GetComponentVersionArtifactCommand = deserialize
|
|
|
1237
1237
|
const deserializeAws_restJson1GetComponentVersionArtifactCommandError = async (output, context) => {
|
|
1238
1238
|
const parsedOutput = {
|
|
1239
1239
|
...output,
|
|
1240
|
-
body: await
|
|
1240
|
+
body: await parseErrorBody(output.body, context),
|
|
1241
1241
|
};
|
|
1242
1242
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1243
1243
|
switch (errorCode) {
|
|
@@ -1286,7 +1286,7 @@ exports.deserializeAws_restJson1GetConnectivityInfoCommand = deserializeAws_rest
|
|
|
1286
1286
|
const deserializeAws_restJson1GetConnectivityInfoCommandError = async (output, context) => {
|
|
1287
1287
|
const parsedOutput = {
|
|
1288
1288
|
...output,
|
|
1289
|
-
body: await
|
|
1289
|
+
body: await parseErrorBody(output.body, context),
|
|
1290
1290
|
};
|
|
1291
1291
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1292
1292
|
switch (errorCode) {
|
|
@@ -1341,7 +1341,7 @@ exports.deserializeAws_restJson1GetCoreDeviceCommand = deserializeAws_restJson1G
|
|
|
1341
1341
|
const deserializeAws_restJson1GetCoreDeviceCommandError = async (output, context) => {
|
|
1342
1342
|
const parsedOutput = {
|
|
1343
1343
|
...output,
|
|
1344
|
-
body: await
|
|
1344
|
+
body: await parseErrorBody(output.body, context),
|
|
1345
1345
|
};
|
|
1346
1346
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1347
1347
|
switch (errorCode) {
|
|
@@ -1423,7 +1423,7 @@ exports.deserializeAws_restJson1GetDeploymentCommand = deserializeAws_restJson1G
|
|
|
1423
1423
|
const deserializeAws_restJson1GetDeploymentCommandError = async (output, context) => {
|
|
1424
1424
|
const parsedOutput = {
|
|
1425
1425
|
...output,
|
|
1426
|
-
body: await
|
|
1426
|
+
body: await parseErrorBody(output.body, context),
|
|
1427
1427
|
};
|
|
1428
1428
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1429
1429
|
switch (errorCode) {
|
|
@@ -1472,7 +1472,7 @@ exports.deserializeAws_restJson1GetServiceRoleForAccountCommand = deserializeAws
|
|
|
1472
1472
|
const deserializeAws_restJson1GetServiceRoleForAccountCommandError = async (output, context) => {
|
|
1473
1473
|
const parsedOutput = {
|
|
1474
1474
|
...output,
|
|
1475
|
-
body: await
|
|
1475
|
+
body: await parseErrorBody(output.body, context),
|
|
1476
1476
|
};
|
|
1477
1477
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1478
1478
|
switch (errorCode) {
|
|
@@ -1509,7 +1509,7 @@ exports.deserializeAws_restJson1ListClientDevicesAssociatedWithCoreDeviceCommand
|
|
|
1509
1509
|
const deserializeAws_restJson1ListClientDevicesAssociatedWithCoreDeviceCommandError = async (output, context) => {
|
|
1510
1510
|
const parsedOutput = {
|
|
1511
1511
|
...output,
|
|
1512
|
-
body: await
|
|
1512
|
+
body: await parseErrorBody(output.body, context),
|
|
1513
1513
|
};
|
|
1514
1514
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1515
1515
|
switch (errorCode) {
|
|
@@ -1558,7 +1558,7 @@ exports.deserializeAws_restJson1ListComponentsCommand = deserializeAws_restJson1
|
|
|
1558
1558
|
const deserializeAws_restJson1ListComponentsCommandError = async (output, context) => {
|
|
1559
1559
|
const parsedOutput = {
|
|
1560
1560
|
...output,
|
|
1561
|
-
body: await
|
|
1561
|
+
body: await parseErrorBody(output.body, context),
|
|
1562
1562
|
};
|
|
1563
1563
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1564
1564
|
switch (errorCode) {
|
|
@@ -1607,7 +1607,7 @@ exports.deserializeAws_restJson1ListComponentVersionsCommand = deserializeAws_re
|
|
|
1607
1607
|
const deserializeAws_restJson1ListComponentVersionsCommandError = async (output, context) => {
|
|
1608
1608
|
const parsedOutput = {
|
|
1609
1609
|
...output,
|
|
1610
|
-
body: await
|
|
1610
|
+
body: await parseErrorBody(output.body, context),
|
|
1611
1611
|
};
|
|
1612
1612
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1613
1613
|
switch (errorCode) {
|
|
@@ -1656,7 +1656,7 @@ exports.deserializeAws_restJson1ListCoreDevicesCommand = deserializeAws_restJson
|
|
|
1656
1656
|
const deserializeAws_restJson1ListCoreDevicesCommandError = async (output, context) => {
|
|
1657
1657
|
const parsedOutput = {
|
|
1658
1658
|
...output,
|
|
1659
|
-
body: await
|
|
1659
|
+
body: await parseErrorBody(output.body, context),
|
|
1660
1660
|
};
|
|
1661
1661
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1662
1662
|
switch (errorCode) {
|
|
@@ -1702,7 +1702,7 @@ exports.deserializeAws_restJson1ListDeploymentsCommand = deserializeAws_restJson
|
|
|
1702
1702
|
const deserializeAws_restJson1ListDeploymentsCommandError = async (output, context) => {
|
|
1703
1703
|
const parsedOutput = {
|
|
1704
1704
|
...output,
|
|
1705
|
-
body: await
|
|
1705
|
+
body: await parseErrorBody(output.body, context),
|
|
1706
1706
|
};
|
|
1707
1707
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1708
1708
|
switch (errorCode) {
|
|
@@ -1748,7 +1748,7 @@ exports.deserializeAws_restJson1ListEffectiveDeploymentsCommand = deserializeAws
|
|
|
1748
1748
|
const deserializeAws_restJson1ListEffectiveDeploymentsCommandError = async (output, context) => {
|
|
1749
1749
|
const parsedOutput = {
|
|
1750
1750
|
...output,
|
|
1751
|
-
body: await
|
|
1751
|
+
body: await parseErrorBody(output.body, context),
|
|
1752
1752
|
};
|
|
1753
1753
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1754
1754
|
switch (errorCode) {
|
|
@@ -1797,7 +1797,7 @@ exports.deserializeAws_restJson1ListInstalledComponentsCommand = deserializeAws_
|
|
|
1797
1797
|
const deserializeAws_restJson1ListInstalledComponentsCommandError = async (output, context) => {
|
|
1798
1798
|
const parsedOutput = {
|
|
1799
1799
|
...output,
|
|
1800
|
-
body: await
|
|
1800
|
+
body: await parseErrorBody(output.body, context),
|
|
1801
1801
|
};
|
|
1802
1802
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1803
1803
|
switch (errorCode) {
|
|
@@ -1843,7 +1843,7 @@ exports.deserializeAws_restJson1ListTagsForResourceCommand = deserializeAws_rest
|
|
|
1843
1843
|
const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
|
|
1844
1844
|
const parsedOutput = {
|
|
1845
1845
|
...output,
|
|
1846
|
-
body: await
|
|
1846
|
+
body: await parseErrorBody(output.body, context),
|
|
1847
1847
|
};
|
|
1848
1848
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1849
1849
|
switch (errorCode) {
|
|
@@ -1883,7 +1883,7 @@ exports.deserializeAws_restJson1ResolveComponentCandidatesCommand = deserializeA
|
|
|
1883
1883
|
const deserializeAws_restJson1ResolveComponentCandidatesCommandError = async (output, context) => {
|
|
1884
1884
|
const parsedOutput = {
|
|
1885
1885
|
...output,
|
|
1886
|
-
body: await
|
|
1886
|
+
body: await parseErrorBody(output.body, context),
|
|
1887
1887
|
};
|
|
1888
1888
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1889
1889
|
switch (errorCode) {
|
|
@@ -1929,7 +1929,7 @@ exports.deserializeAws_restJson1TagResourceCommand = deserializeAws_restJson1Tag
|
|
|
1929
1929
|
const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
|
|
1930
1930
|
const parsedOutput = {
|
|
1931
1931
|
...output,
|
|
1932
|
-
body: await
|
|
1932
|
+
body: await parseErrorBody(output.body, context),
|
|
1933
1933
|
};
|
|
1934
1934
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1935
1935
|
switch (errorCode) {
|
|
@@ -1966,7 +1966,7 @@ exports.deserializeAws_restJson1UntagResourceCommand = deserializeAws_restJson1U
|
|
|
1966
1966
|
const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
|
|
1967
1967
|
const parsedOutput = {
|
|
1968
1968
|
...output,
|
|
1969
|
-
body: await
|
|
1969
|
+
body: await parseErrorBody(output.body, context),
|
|
1970
1970
|
};
|
|
1971
1971
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1972
1972
|
switch (errorCode) {
|
|
@@ -2009,7 +2009,7 @@ exports.deserializeAws_restJson1UpdateConnectivityInfoCommand = deserializeAws_r
|
|
|
2009
2009
|
const deserializeAws_restJson1UpdateConnectivityInfoCommandError = async (output, context) => {
|
|
2010
2010
|
const parsedOutput = {
|
|
2011
2011
|
...output,
|
|
2012
|
-
body: await
|
|
2012
|
+
body: await parseErrorBody(output.body, context),
|
|
2013
2013
|
};
|
|
2014
2014
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2015
2015
|
switch (errorCode) {
|
|
@@ -3021,6 +3021,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
|
|
|
3021
3021
|
}
|
|
3022
3022
|
return {};
|
|
3023
3023
|
});
|
|
3024
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
3025
|
+
var _a;
|
|
3026
|
+
const value = await parseBody(errorBody, context);
|
|
3027
|
+
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
3028
|
+
return value;
|
|
3029
|
+
};
|
|
3024
3030
|
const loadRestJsonErrorCode = (output, data) => {
|
|
3025
3031
|
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
3026
3032
|
const sanitizeErrorCode = (rawValue) => {
|
|
@@ -773,7 +773,7 @@ var deserializeAws_restJson1AssociateServiceRoleToAccountCommandError = function
|
|
|
773
773
|
case 0:
|
|
774
774
|
_a = [__assign({}, output)];
|
|
775
775
|
_c = {};
|
|
776
|
-
return [4,
|
|
776
|
+
return [4, parseErrorBody(output.body, context)];
|
|
777
777
|
case 1:
|
|
778
778
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
779
779
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -833,7 +833,7 @@ var deserializeAws_restJson1BatchAssociateClientDeviceWithCoreDeviceCommandError
|
|
|
833
833
|
case 0:
|
|
834
834
|
_a = [__assign({}, output)];
|
|
835
835
|
_c = {};
|
|
836
|
-
return [4,
|
|
836
|
+
return [4, parseErrorBody(output.body, context)];
|
|
837
837
|
case 1:
|
|
838
838
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
839
839
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -905,7 +905,7 @@ var deserializeAws_restJson1BatchDisassociateClientDeviceFromCoreDeviceCommandEr
|
|
|
905
905
|
case 0:
|
|
906
906
|
_a = [__assign({}, output)];
|
|
907
907
|
_c = {};
|
|
908
|
-
return [4,
|
|
908
|
+
return [4, parseErrorBody(output.body, context)];
|
|
909
909
|
case 1:
|
|
910
910
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
911
911
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -977,7 +977,7 @@ var deserializeAws_restJson1CancelDeploymentCommandError = function (output, con
|
|
|
977
977
|
case 0:
|
|
978
978
|
_a = [__assign({}, output)];
|
|
979
979
|
_c = {};
|
|
980
|
-
return [4,
|
|
980
|
+
return [4, parseErrorBody(output.body, context)];
|
|
981
981
|
case 1:
|
|
982
982
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
983
983
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1065,7 +1065,7 @@ var deserializeAws_restJson1CreateComponentVersionCommandError = function (outpu
|
|
|
1065
1065
|
case 0:
|
|
1066
1066
|
_a = [__assign({}, output)];
|
|
1067
1067
|
_c = {};
|
|
1068
|
-
return [4,
|
|
1068
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1069
1069
|
case 1:
|
|
1070
1070
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1071
1071
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1151,7 +1151,7 @@ var deserializeAws_restJson1CreateDeploymentCommandError = function (output, con
|
|
|
1151
1151
|
case 0:
|
|
1152
1152
|
_a = [__assign({}, output)];
|
|
1153
1153
|
_c = {};
|
|
1154
|
-
return [4,
|
|
1154
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1155
1155
|
case 1:
|
|
1156
1156
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1157
1157
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1226,7 +1226,7 @@ var deserializeAws_restJson1DeleteComponentCommandError = function (output, cont
|
|
|
1226
1226
|
case 0:
|
|
1227
1227
|
_a = [__assign({}, output)];
|
|
1228
1228
|
_c = {};
|
|
1229
|
-
return [4,
|
|
1229
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1230
1230
|
case 1:
|
|
1231
1231
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1232
1232
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1297,7 +1297,7 @@ var deserializeAws_restJson1DeleteCoreDeviceCommandError = function (output, con
|
|
|
1297
1297
|
case 0:
|
|
1298
1298
|
_a = [__assign({}, output)];
|
|
1299
1299
|
_c = {};
|
|
1300
|
-
return [4,
|
|
1300
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1301
1301
|
case 1:
|
|
1302
1302
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1303
1303
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1368,7 +1368,7 @@ var deserializeAws_restJson1DeleteDeploymentCommandError = function (output, con
|
|
|
1368
1368
|
case 0:
|
|
1369
1369
|
_a = [__assign({}, output)];
|
|
1370
1370
|
_c = {};
|
|
1371
|
-
return [4,
|
|
1371
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1372
1372
|
case 1:
|
|
1373
1373
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1374
1374
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1468,7 +1468,7 @@ var deserializeAws_restJson1DescribeComponentCommandError = function (output, co
|
|
|
1468
1468
|
case 0:
|
|
1469
1469
|
_a = [__assign({}, output)];
|
|
1470
1470
|
_c = {};
|
|
1471
|
-
return [4,
|
|
1471
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1472
1472
|
case 1:
|
|
1473
1473
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1474
1474
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1540,7 +1540,7 @@ var deserializeAws_restJson1DisassociateServiceRoleFromAccountCommandError = fun
|
|
|
1540
1540
|
case 0:
|
|
1541
1541
|
_a = [__assign({}, output)];
|
|
1542
1542
|
_c = {};
|
|
1543
|
-
return [4,
|
|
1543
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1544
1544
|
case 1:
|
|
1545
1545
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1546
1546
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1602,7 +1602,7 @@ var deserializeAws_restJson1GetComponentCommandError = function (output, context
|
|
|
1602
1602
|
case 0:
|
|
1603
1603
|
_a = [__assign({}, output)];
|
|
1604
1604
|
_c = {};
|
|
1605
|
-
return [4,
|
|
1605
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1606
1606
|
case 1:
|
|
1607
1607
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1608
1608
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1674,7 +1674,7 @@ var deserializeAws_restJson1GetComponentVersionArtifactCommandError = function (
|
|
|
1674
1674
|
case 0:
|
|
1675
1675
|
_a = [__assign({}, output)];
|
|
1676
1676
|
_c = {};
|
|
1677
|
-
return [4,
|
|
1677
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1678
1678
|
case 1:
|
|
1679
1679
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1680
1680
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1749,7 +1749,7 @@ var deserializeAws_restJson1GetConnectivityInfoCommandError = function (output,
|
|
|
1749
1749
|
case 0:
|
|
1750
1750
|
_a = [__assign({}, output)];
|
|
1751
1751
|
_c = {};
|
|
1752
|
-
return [4,
|
|
1752
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1753
1753
|
case 1:
|
|
1754
1754
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1755
1755
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1827,7 +1827,7 @@ var deserializeAws_restJson1GetCoreDeviceCommandError = function (output, contex
|
|
|
1827
1827
|
case 0:
|
|
1828
1828
|
_a = [__assign({}, output)];
|
|
1829
1829
|
_c = {};
|
|
1830
|
-
return [4,
|
|
1830
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1831
1831
|
case 1:
|
|
1832
1832
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1833
1833
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1935,7 +1935,7 @@ var deserializeAws_restJson1GetDeploymentCommandError = function (output, contex
|
|
|
1935
1935
|
case 0:
|
|
1936
1936
|
_a = [__assign({}, output)];
|
|
1937
1937
|
_c = {};
|
|
1938
|
-
return [4,
|
|
1938
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1939
1939
|
case 1:
|
|
1940
1940
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1941
1941
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -2010,7 +2010,7 @@ var deserializeAws_restJson1GetServiceRoleForAccountCommandError = function (out
|
|
|
2010
2010
|
case 0:
|
|
2011
2011
|
_a = [__assign({}, output)];
|
|
2012
2012
|
_c = {};
|
|
2013
|
-
return [4,
|
|
2013
|
+
return [4, parseErrorBody(output.body, context)];
|
|
2014
2014
|
case 1:
|
|
2015
2015
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
2016
2016
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -2069,7 +2069,7 @@ var deserializeAws_restJson1ListClientDevicesAssociatedWithCoreDeviceCommandErro
|
|
|
2069
2069
|
case 0:
|
|
2070
2070
|
_a = [__assign({}, output)];
|
|
2071
2071
|
_c = {};
|
|
2072
|
-
return [4,
|
|
2072
|
+
return [4, parseErrorBody(output.body, context)];
|
|
2073
2073
|
case 1:
|
|
2074
2074
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
2075
2075
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -2144,7 +2144,7 @@ var deserializeAws_restJson1ListComponentsCommandError = function (output, conte
|
|
|
2144
2144
|
case 0:
|
|
2145
2145
|
_a = [__assign({}, output)];
|
|
2146
2146
|
_c = {};
|
|
2147
|
-
return [4,
|
|
2147
|
+
return [4, parseErrorBody(output.body, context)];
|
|
2148
2148
|
case 1:
|
|
2149
2149
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
2150
2150
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -2219,7 +2219,7 @@ var deserializeAws_restJson1ListComponentVersionsCommandError = function (output
|
|
|
2219
2219
|
case 0:
|
|
2220
2220
|
_a = [__assign({}, output)];
|
|
2221
2221
|
_c = {};
|
|
2222
|
-
return [4,
|
|
2222
|
+
return [4, parseErrorBody(output.body, context)];
|
|
2223
2223
|
case 1:
|
|
2224
2224
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
2225
2225
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -2294,7 +2294,7 @@ var deserializeAws_restJson1ListCoreDevicesCommandError = function (output, cont
|
|
|
2294
2294
|
case 0:
|
|
2295
2295
|
_a = [__assign({}, output)];
|
|
2296
2296
|
_c = {};
|
|
2297
|
-
return [4,
|
|
2297
|
+
return [4, parseErrorBody(output.body, context)];
|
|
2298
2298
|
case 1:
|
|
2299
2299
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
2300
2300
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -2365,7 +2365,7 @@ var deserializeAws_restJson1ListDeploymentsCommandError = function (output, cont
|
|
|
2365
2365
|
case 0:
|
|
2366
2366
|
_a = [__assign({}, output)];
|
|
2367
2367
|
_c = {};
|
|
2368
|
-
return [4,
|
|
2368
|
+
return [4, parseErrorBody(output.body, context)];
|
|
2369
2369
|
case 1:
|
|
2370
2370
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
2371
2371
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -2436,7 +2436,7 @@ var deserializeAws_restJson1ListEffectiveDeploymentsCommandError = function (out
|
|
|
2436
2436
|
case 0:
|
|
2437
2437
|
_a = [__assign({}, output)];
|
|
2438
2438
|
_c = {};
|
|
2439
|
-
return [4,
|
|
2439
|
+
return [4, parseErrorBody(output.body, context)];
|
|
2440
2440
|
case 1:
|
|
2441
2441
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
2442
2442
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -2511,7 +2511,7 @@ var deserializeAws_restJson1ListInstalledComponentsCommandError = function (outp
|
|
|
2511
2511
|
case 0:
|
|
2512
2512
|
_a = [__assign({}, output)];
|
|
2513
2513
|
_c = {};
|
|
2514
|
-
return [4,
|
|
2514
|
+
return [4, parseErrorBody(output.body, context)];
|
|
2515
2515
|
case 1:
|
|
2516
2516
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
2517
2517
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -2583,7 +2583,7 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
|
|
|
2583
2583
|
case 0:
|
|
2584
2584
|
_a = [__assign({}, output)];
|
|
2585
2585
|
_c = {};
|
|
2586
|
-
return [4,
|
|
2586
|
+
return [4, parseErrorBody(output.body, context)];
|
|
2587
2587
|
case 1:
|
|
2588
2588
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
2589
2589
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -2647,7 +2647,7 @@ var deserializeAws_restJson1ResolveComponentCandidatesCommandError = function (o
|
|
|
2647
2647
|
case 0:
|
|
2648
2648
|
_a = [__assign({}, output)];
|
|
2649
2649
|
_c = {};
|
|
2650
|
-
return [4,
|
|
2650
|
+
return [4, parseErrorBody(output.body, context)];
|
|
2651
2651
|
case 1:
|
|
2652
2652
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
2653
2653
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -2718,7 +2718,7 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
|
|
|
2718
2718
|
case 0:
|
|
2719
2719
|
_a = [__assign({}, output)];
|
|
2720
2720
|
_c = {};
|
|
2721
|
-
return [4,
|
|
2721
|
+
return [4, parseErrorBody(output.body, context)];
|
|
2722
2722
|
case 1:
|
|
2723
2723
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
2724
2724
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -2777,7 +2777,7 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
|
|
|
2777
2777
|
case 0:
|
|
2778
2778
|
_a = [__assign({}, output)];
|
|
2779
2779
|
_c = {};
|
|
2780
|
-
return [4,
|
|
2780
|
+
return [4, parseErrorBody(output.body, context)];
|
|
2781
2781
|
case 1:
|
|
2782
2782
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
2783
2783
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -2844,7 +2844,7 @@ var deserializeAws_restJson1UpdateConnectivityInfoCommandError = function (outpu
|
|
|
2844
2844
|
case 0:
|
|
2845
2845
|
_a = [__assign({}, output)];
|
|
2846
2846
|
_c = {};
|
|
2847
|
-
return [4,
|
|
2847
|
+
return [4, parseErrorBody(output.body, context)];
|
|
2848
2848
|
case 1:
|
|
2849
2849
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
2850
2850
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -3758,6 +3758,19 @@ var parseBody = function (streamBody, context) {
|
|
|
3758
3758
|
return {};
|
|
3759
3759
|
});
|
|
3760
3760
|
};
|
|
3761
|
+
var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3762
|
+
var value;
|
|
3763
|
+
var _a;
|
|
3764
|
+
return __generator(this, function (_b) {
|
|
3765
|
+
switch (_b.label) {
|
|
3766
|
+
case 0: return [4, parseBody(errorBody, context)];
|
|
3767
|
+
case 1:
|
|
3768
|
+
value = _b.sent();
|
|
3769
|
+
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
3770
|
+
return [2, value];
|
|
3771
|
+
}
|
|
3772
|
+
});
|
|
3773
|
+
}); };
|
|
3761
3774
|
var loadRestJsonErrorCode = function (output, data) {
|
|
3762
3775
|
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
3763
3776
|
var sanitizeErrorCode = function (rawValue) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-greengrassv2",
|
|
3
3
|
"description": "AWS SDK for JavaScript Greengrassv2 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",
|