@aws-sdk/client-inspector2 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-inspector2
@@ -754,7 +754,7 @@ exports.deserializeAws_restJson1AssociateMemberCommand = deserializeAws_restJson
754
754
  const deserializeAws_restJson1AssociateMemberCommandError = async (output, context) => {
755
755
  const parsedOutput = {
756
756
  ...output,
757
- body: await parseBody(output.body, context),
757
+ body: await parseErrorBody(output.body, context),
758
758
  };
759
759
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
760
760
  switch (errorCode) {
@@ -800,7 +800,7 @@ exports.deserializeAws_restJson1BatchGetAccountStatusCommand = deserializeAws_re
800
800
  const deserializeAws_restJson1BatchGetAccountStatusCommandError = async (output, context) => {
801
801
  const parsedOutput = {
802
802
  ...output,
803
- body: await parseBody(output.body, context),
803
+ body: await parseErrorBody(output.body, context),
804
804
  };
805
805
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
806
806
  switch (errorCode) {
@@ -849,7 +849,7 @@ exports.deserializeAws_restJson1BatchGetFreeTrialInfoCommand = deserializeAws_re
849
849
  const deserializeAws_restJson1BatchGetFreeTrialInfoCommandError = async (output, context) => {
850
850
  const parsedOutput = {
851
851
  ...output,
852
- body: await parseBody(output.body, context),
852
+ body: await parseErrorBody(output.body, context),
853
853
  };
854
854
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
855
855
  switch (errorCode) {
@@ -892,7 +892,7 @@ exports.deserializeAws_restJson1CancelFindingsReportCommand = deserializeAws_res
892
892
  const deserializeAws_restJson1CancelFindingsReportCommandError = async (output, context) => {
893
893
  const parsedOutput = {
894
894
  ...output,
895
- body: await parseBody(output.body, context),
895
+ body: await parseErrorBody(output.body, context),
896
896
  };
897
897
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
898
898
  switch (errorCode) {
@@ -938,7 +938,7 @@ exports.deserializeAws_restJson1CreateFilterCommand = deserializeAws_restJson1Cr
938
938
  const deserializeAws_restJson1CreateFilterCommandError = async (output, context) => {
939
939
  const parsedOutput = {
940
940
  ...output,
941
- body: await parseBody(output.body, context),
941
+ body: await parseErrorBody(output.body, context),
942
942
  };
943
943
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
944
944
  switch (errorCode) {
@@ -987,7 +987,7 @@ exports.deserializeAws_restJson1CreateFindingsReportCommand = deserializeAws_res
987
987
  const deserializeAws_restJson1CreateFindingsReportCommandError = async (output, context) => {
988
988
  const parsedOutput = {
989
989
  ...output,
990
- body: await parseBody(output.body, context),
990
+ body: await parseErrorBody(output.body, context),
991
991
  };
992
992
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
993
993
  switch (errorCode) {
@@ -1033,7 +1033,7 @@ exports.deserializeAws_restJson1DeleteFilterCommand = deserializeAws_restJson1De
1033
1033
  const deserializeAws_restJson1DeleteFilterCommandError = async (output, context) => {
1034
1034
  const parsedOutput = {
1035
1035
  ...output,
1036
- body: await parseBody(output.body, context),
1036
+ body: await parseErrorBody(output.body, context),
1037
1037
  };
1038
1038
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1039
1039
  switch (errorCode) {
@@ -1082,7 +1082,7 @@ exports.deserializeAws_restJson1DescribeOrganizationConfigurationCommand = deser
1082
1082
  const deserializeAws_restJson1DescribeOrganizationConfigurationCommandError = async (output, context) => {
1083
1083
  const parsedOutput = {
1084
1084
  ...output,
1085
- body: await parseBody(output.body, context),
1085
+ body: await parseErrorBody(output.body, context),
1086
1086
  };
1087
1087
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1088
1088
  switch (errorCode) {
@@ -1128,7 +1128,7 @@ exports.deserializeAws_restJson1DisableCommand = deserializeAws_restJson1Disable
1128
1128
  const deserializeAws_restJson1DisableCommandError = async (output, context) => {
1129
1129
  const parsedOutput = {
1130
1130
  ...output,
1131
- body: await parseBody(output.body, context),
1131
+ body: await parseErrorBody(output.body, context),
1132
1132
  };
1133
1133
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1134
1134
  switch (errorCode) {
@@ -1174,7 +1174,7 @@ exports.deserializeAws_restJson1DisableDelegatedAdminAccountCommand = deserializ
1174
1174
  const deserializeAws_restJson1DisableDelegatedAdminAccountCommandError = async (output, context) => {
1175
1175
  const parsedOutput = {
1176
1176
  ...output,
1177
- body: await parseBody(output.body, context),
1177
+ body: await parseErrorBody(output.body, context),
1178
1178
  };
1179
1179
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1180
1180
  switch (errorCode) {
@@ -1223,7 +1223,7 @@ exports.deserializeAws_restJson1DisassociateMemberCommand = deserializeAws_restJ
1223
1223
  const deserializeAws_restJson1DisassociateMemberCommandError = async (output, context) => {
1224
1224
  const parsedOutput = {
1225
1225
  ...output,
1226
- body: await parseBody(output.body, context),
1226
+ body: await parseErrorBody(output.body, context),
1227
1227
  };
1228
1228
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1229
1229
  switch (errorCode) {
@@ -1269,7 +1269,7 @@ exports.deserializeAws_restJson1EnableCommand = deserializeAws_restJson1EnableCo
1269
1269
  const deserializeAws_restJson1EnableCommandError = async (output, context) => {
1270
1270
  const parsedOutput = {
1271
1271
  ...output,
1272
- body: await parseBody(output.body, context),
1272
+ body: await parseErrorBody(output.body, context),
1273
1273
  };
1274
1274
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1275
1275
  switch (errorCode) {
@@ -1315,7 +1315,7 @@ exports.deserializeAws_restJson1EnableDelegatedAdminAccountCommand = deserialize
1315
1315
  const deserializeAws_restJson1EnableDelegatedAdminAccountCommandError = async (output, context) => {
1316
1316
  const parsedOutput = {
1317
1317
  ...output,
1318
- body: await parseBody(output.body, context),
1318
+ body: await parseErrorBody(output.body, context),
1319
1319
  };
1320
1320
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1321
1321
  switch (errorCode) {
@@ -1364,7 +1364,7 @@ exports.deserializeAws_restJson1GetConfigurationCommand = deserializeAws_restJso
1364
1364
  const deserializeAws_restJson1GetConfigurationCommandError = async (output, context) => {
1365
1365
  const parsedOutput = {
1366
1366
  ...output,
1367
- body: await parseBody(output.body, context),
1367
+ body: await parseErrorBody(output.body, context),
1368
1368
  };
1369
1369
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1370
1370
  switch (errorCode) {
@@ -1404,7 +1404,7 @@ exports.deserializeAws_restJson1GetDelegatedAdminAccountCommand = deserializeAws
1404
1404
  const deserializeAws_restJson1GetDelegatedAdminAccountCommandError = async (output, context) => {
1405
1405
  const parsedOutput = {
1406
1406
  ...output,
1407
- body: await parseBody(output.body, context),
1407
+ body: await parseErrorBody(output.body, context),
1408
1408
  };
1409
1409
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1410
1410
  switch (errorCode) {
@@ -1465,7 +1465,7 @@ exports.deserializeAws_restJson1GetFindingsReportStatusCommand = deserializeAws_
1465
1465
  const deserializeAws_restJson1GetFindingsReportStatusCommandError = async (output, context) => {
1466
1466
  const parsedOutput = {
1467
1467
  ...output,
1468
- body: await parseBody(output.body, context),
1468
+ body: await parseErrorBody(output.body, context),
1469
1469
  };
1470
1470
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1471
1471
  switch (errorCode) {
@@ -1511,7 +1511,7 @@ exports.deserializeAws_restJson1GetMemberCommand = deserializeAws_restJson1GetMe
1511
1511
  const deserializeAws_restJson1GetMemberCommandError = async (output, context) => {
1512
1512
  const parsedOutput = {
1513
1513
  ...output,
1514
- body: await parseBody(output.body, context),
1514
+ body: await parseErrorBody(output.body, context),
1515
1515
  };
1516
1516
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1517
1517
  switch (errorCode) {
@@ -1560,7 +1560,7 @@ exports.deserializeAws_restJson1ListAccountPermissionsCommand = deserializeAws_r
1560
1560
  const deserializeAws_restJson1ListAccountPermissionsCommandError = async (output, context) => {
1561
1561
  const parsedOutput = {
1562
1562
  ...output,
1563
- body: await parseBody(output.body, context),
1563
+ body: await parseErrorBody(output.body, context),
1564
1564
  };
1565
1565
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1566
1566
  switch (errorCode) {
@@ -1606,7 +1606,7 @@ exports.deserializeAws_restJson1ListCoverageCommand = deserializeAws_restJson1Li
1606
1606
  const deserializeAws_restJson1ListCoverageCommandError = async (output, context) => {
1607
1607
  const parsedOutput = {
1608
1608
  ...output,
1609
- body: await parseBody(output.body, context),
1609
+ body: await parseErrorBody(output.body, context),
1610
1610
  };
1611
1611
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1612
1612
  switch (errorCode) {
@@ -1652,7 +1652,7 @@ exports.deserializeAws_restJson1ListCoverageStatisticsCommand = deserializeAws_r
1652
1652
  const deserializeAws_restJson1ListCoverageStatisticsCommandError = async (output, context) => {
1653
1653
  const parsedOutput = {
1654
1654
  ...output,
1655
- body: await parseBody(output.body, context),
1655
+ body: await parseErrorBody(output.body, context),
1656
1656
  };
1657
1657
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1658
1658
  switch (errorCode) {
@@ -1695,7 +1695,7 @@ exports.deserializeAws_restJson1ListDelegatedAdminAccountsCommand = deserializeA
1695
1695
  const deserializeAws_restJson1ListDelegatedAdminAccountsCommandError = async (output, context) => {
1696
1696
  const parsedOutput = {
1697
1697
  ...output,
1698
- body: await parseBody(output.body, context),
1698
+ body: await parseErrorBody(output.body, context),
1699
1699
  };
1700
1700
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1701
1701
  switch (errorCode) {
@@ -1741,7 +1741,7 @@ exports.deserializeAws_restJson1ListFiltersCommand = deserializeAws_restJson1Lis
1741
1741
  const deserializeAws_restJson1ListFiltersCommandError = async (output, context) => {
1742
1742
  const parsedOutput = {
1743
1743
  ...output,
1744
- body: await parseBody(output.body, context),
1744
+ body: await parseErrorBody(output.body, context),
1745
1745
  };
1746
1746
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1747
1747
  switch (errorCode) {
@@ -1790,7 +1790,7 @@ exports.deserializeAws_restJson1ListFindingAggregationsCommand = deserializeAws_
1790
1790
  const deserializeAws_restJson1ListFindingAggregationsCommandError = async (output, context) => {
1791
1791
  const parsedOutput = {
1792
1792
  ...output,
1793
- body: await parseBody(output.body, context),
1793
+ body: await parseErrorBody(output.body, context),
1794
1794
  };
1795
1795
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1796
1796
  switch (errorCode) {
@@ -1833,7 +1833,7 @@ exports.deserializeAws_restJson1ListFindingsCommand = deserializeAws_restJson1Li
1833
1833
  const deserializeAws_restJson1ListFindingsCommandError = async (output, context) => {
1834
1834
  const parsedOutput = {
1835
1835
  ...output,
1836
- body: await parseBody(output.body, context),
1836
+ body: await parseErrorBody(output.body, context),
1837
1837
  };
1838
1838
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1839
1839
  switch (errorCode) {
@@ -1876,7 +1876,7 @@ exports.deserializeAws_restJson1ListMembersCommand = deserializeAws_restJson1Lis
1876
1876
  const deserializeAws_restJson1ListMembersCommandError = async (output, context) => {
1877
1877
  const parsedOutput = {
1878
1878
  ...output,
1879
- body: await parseBody(output.body, context),
1879
+ body: await parseErrorBody(output.body, context),
1880
1880
  };
1881
1881
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1882
1882
  switch (errorCode) {
@@ -1919,7 +1919,7 @@ exports.deserializeAws_restJson1ListTagsForResourceCommand = deserializeAws_rest
1919
1919
  const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
1920
1920
  const parsedOutput = {
1921
1921
  ...output,
1922
- body: await parseBody(output.body, context),
1922
+ body: await parseErrorBody(output.body, context),
1923
1923
  };
1924
1924
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1925
1925
  switch (errorCode) {
@@ -1965,7 +1965,7 @@ exports.deserializeAws_restJson1ListUsageTotalsCommand = deserializeAws_restJson
1965
1965
  const deserializeAws_restJson1ListUsageTotalsCommandError = async (output, context) => {
1966
1966
  const parsedOutput = {
1967
1967
  ...output,
1968
- body: await parseBody(output.body, context),
1968
+ body: await parseErrorBody(output.body, context),
1969
1969
  };
1970
1970
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1971
1971
  switch (errorCode) {
@@ -2005,7 +2005,7 @@ exports.deserializeAws_restJson1TagResourceCommand = deserializeAws_restJson1Tag
2005
2005
  const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
2006
2006
  const parsedOutput = {
2007
2007
  ...output,
2008
- body: await parseBody(output.body, context),
2008
+ body: await parseErrorBody(output.body, context),
2009
2009
  };
2010
2010
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2011
2011
  switch (errorCode) {
@@ -2048,7 +2048,7 @@ exports.deserializeAws_restJson1UntagResourceCommand = deserializeAws_restJson1U
2048
2048
  const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
2049
2049
  const parsedOutput = {
2050
2050
  ...output,
2051
- body: await parseBody(output.body, context),
2051
+ body: await parseErrorBody(output.body, context),
2052
2052
  };
2053
2053
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2054
2054
  switch (errorCode) {
@@ -2088,7 +2088,7 @@ exports.deserializeAws_restJson1UpdateConfigurationCommand = deserializeAws_rest
2088
2088
  const deserializeAws_restJson1UpdateConfigurationCommandError = async (output, context) => {
2089
2089
  const parsedOutput = {
2090
2090
  ...output,
2091
- body: await parseBody(output.body, context),
2091
+ body: await parseErrorBody(output.body, context),
2092
2092
  };
2093
2093
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2094
2094
  switch (errorCode) {
@@ -2131,7 +2131,7 @@ exports.deserializeAws_restJson1UpdateFilterCommand = deserializeAws_restJson1Up
2131
2131
  const deserializeAws_restJson1UpdateFilterCommandError = async (output, context) => {
2132
2132
  const parsedOutput = {
2133
2133
  ...output,
2134
- body: await parseBody(output.body, context),
2134
+ body: await parseErrorBody(output.body, context),
2135
2135
  };
2136
2136
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2137
2137
  switch (errorCode) {
@@ -2177,7 +2177,7 @@ exports.deserializeAws_restJson1UpdateOrganizationConfigurationCommand = deseria
2177
2177
  const deserializeAws_restJson1UpdateOrganizationConfigurationCommandError = async (output, context) => {
2178
2178
  const parsedOutput = {
2179
2179
  ...output,
2180
- body: await parseBody(output.body, context),
2180
+ body: await parseErrorBody(output.body, context),
2181
2181
  };
2182
2182
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2183
2183
  switch (errorCode) {
@@ -3834,6 +3834,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
3834
3834
  }
3835
3835
  return {};
3836
3836
  });
3837
+ const parseErrorBody = async (errorBody, context) => {
3838
+ var _a;
3839
+ const value = await parseBody(errorBody, context);
3840
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
3841
+ return value;
3842
+ };
3837
3843
  const loadRestJsonErrorCode = (output, data) => {
3838
3844
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
3839
3845
  const sanitizeErrorCode = (rawValue) => {
@@ -834,7 +834,7 @@ var deserializeAws_restJson1AssociateMemberCommandError = function (output, cont
834
834
  case 0:
835
835
  _a = [__assign({}, output)];
836
836
  _c = {};
837
- return [4, parseBody(output.body, context)];
837
+ return [4, parseErrorBody(output.body, context)];
838
838
  case 1:
839
839
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
840
840
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -905,7 +905,7 @@ var deserializeAws_restJson1BatchGetAccountStatusCommandError = function (output
905
905
  case 0:
906
906
  _a = [__assign({}, output)];
907
907
  _c = {};
908
- return [4, parseBody(output.body, context)];
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);
@@ -980,7 +980,7 @@ var deserializeAws_restJson1BatchGetFreeTrialInfoCommandError = function (output
980
980
  case 0:
981
981
  _a = [__assign({}, output)];
982
982
  _c = {};
983
- return [4, parseBody(output.body, context)];
983
+ return [4, parseErrorBody(output.body, context)];
984
984
  case 1:
985
985
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
986
986
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1048,7 +1048,7 @@ var deserializeAws_restJson1CancelFindingsReportCommandError = function (output,
1048
1048
  case 0:
1049
1049
  _a = [__assign({}, output)];
1050
1050
  _c = {};
1051
- return [4, parseBody(output.body, context)];
1051
+ return [4, parseErrorBody(output.body, context)];
1052
1052
  case 1:
1053
1053
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1054
1054
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1120,7 +1120,7 @@ var deserializeAws_restJson1CreateFilterCommandError = function (output, context
1120
1120
  case 0:
1121
1121
  _a = [__assign({}, output)];
1122
1122
  _c = {};
1123
- return [4, parseBody(output.body, context)];
1123
+ return [4, parseErrorBody(output.body, context)];
1124
1124
  case 1:
1125
1125
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1126
1126
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1196,7 +1196,7 @@ var deserializeAws_restJson1CreateFindingsReportCommandError = function (output,
1196
1196
  case 0:
1197
1197
  _a = [__assign({}, output)];
1198
1198
  _c = {};
1199
- return [4, parseBody(output.body, context)];
1199
+ return [4, parseErrorBody(output.body, context)];
1200
1200
  case 1:
1201
1201
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1202
1202
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1268,7 +1268,7 @@ var deserializeAws_restJson1DeleteFilterCommandError = function (output, context
1268
1268
  case 0:
1269
1269
  _a = [__assign({}, output)];
1270
1270
  _c = {};
1271
- return [4, parseBody(output.body, context)];
1271
+ return [4, parseErrorBody(output.body, context)];
1272
1272
  case 1:
1273
1273
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1274
1274
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1343,7 +1343,7 @@ var deserializeAws_restJson1DescribeOrganizationConfigurationCommandError = func
1343
1343
  case 0:
1344
1344
  _a = [__assign({}, output)];
1345
1345
  _c = {};
1346
- return [4, parseBody(output.body, context)];
1346
+ return [4, parseErrorBody(output.body, context)];
1347
1347
  case 1:
1348
1348
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1349
1349
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1414,7 +1414,7 @@ var deserializeAws_restJson1DisableCommandError = function (output, context) { r
1414
1414
  case 0:
1415
1415
  _a = [__assign({}, output)];
1416
1416
  _c = {};
1417
- return [4, parseBody(output.body, context)];
1417
+ return [4, parseErrorBody(output.body, context)];
1418
1418
  case 1:
1419
1419
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1420
1420
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1486,7 +1486,7 @@ var deserializeAws_restJson1DisableDelegatedAdminAccountCommandError = function
1486
1486
  case 0:
1487
1487
  _a = [__assign({}, output)];
1488
1488
  _c = {};
1489
- return [4, parseBody(output.body, context)];
1489
+ return [4, parseErrorBody(output.body, context)];
1490
1490
  case 1:
1491
1491
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1492
1492
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1562,7 +1562,7 @@ var deserializeAws_restJson1DisassociateMemberCommandError = function (output, c
1562
1562
  case 0:
1563
1563
  _a = [__assign({}, output)];
1564
1564
  _c = {};
1565
- return [4, parseBody(output.body, context)];
1565
+ return [4, parseErrorBody(output.body, context)];
1566
1566
  case 1:
1567
1567
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1568
1568
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1633,7 +1633,7 @@ var deserializeAws_restJson1EnableCommandError = function (output, context) { re
1633
1633
  case 0:
1634
1634
  _a = [__assign({}, output)];
1635
1635
  _c = {};
1636
- return [4, parseBody(output.body, context)];
1636
+ return [4, parseErrorBody(output.body, context)];
1637
1637
  case 1:
1638
1638
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1639
1639
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1705,7 +1705,7 @@ var deserializeAws_restJson1EnableDelegatedAdminAccountCommandError = function (
1705
1705
  case 0:
1706
1706
  _a = [__assign({}, output)];
1707
1707
  _c = {};
1708
- return [4, parseBody(output.body, context)];
1708
+ return [4, parseErrorBody(output.body, context)];
1709
1709
  case 1:
1710
1710
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1711
1711
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1781,7 +1781,7 @@ var deserializeAws_restJson1GetConfigurationCommandError = function (output, con
1781
1781
  case 0:
1782
1782
  _a = [__assign({}, output)];
1783
1783
  _c = {};
1784
- return [4, parseBody(output.body, context)];
1784
+ return [4, parseErrorBody(output.body, context)];
1785
1785
  case 1:
1786
1786
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1787
1787
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1845,7 +1845,7 @@ var deserializeAws_restJson1GetDelegatedAdminAccountCommandError = function (out
1845
1845
  case 0:
1846
1846
  _a = [__assign({}, output)];
1847
1847
  _c = {};
1848
- return [4, parseBody(output.body, context)];
1848
+ return [4, parseErrorBody(output.body, context)];
1849
1849
  case 1:
1850
1850
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1851
1851
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1932,7 +1932,7 @@ var deserializeAws_restJson1GetFindingsReportStatusCommandError = function (outp
1932
1932
  case 0:
1933
1933
  _a = [__assign({}, output)];
1934
1934
  _c = {};
1935
- return [4, parseBody(output.body, context)];
1935
+ return [4, parseErrorBody(output.body, context)];
1936
1936
  case 1:
1937
1937
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1938
1938
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2004,7 +2004,7 @@ var deserializeAws_restJson1GetMemberCommandError = function (output, context) {
2004
2004
  case 0:
2005
2005
  _a = [__assign({}, output)];
2006
2006
  _c = {};
2007
- return [4, parseBody(output.body, context)];
2007
+ return [4, parseErrorBody(output.body, context)];
2008
2008
  case 1:
2009
2009
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2010
2010
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2079,7 +2079,7 @@ var deserializeAws_restJson1ListAccountPermissionsCommandError = function (outpu
2079
2079
  case 0:
2080
2080
  _a = [__assign({}, output)];
2081
2081
  _c = {};
2082
- return [4, parseBody(output.body, context)];
2082
+ return [4, parseErrorBody(output.body, context)];
2083
2083
  case 1:
2084
2084
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2085
2085
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2150,7 +2150,7 @@ var deserializeAws_restJson1ListCoverageCommandError = function (output, context
2150
2150
  case 0:
2151
2151
  _a = [__assign({}, output)];
2152
2152
  _c = {};
2153
- return [4, parseBody(output.body, context)];
2153
+ return [4, parseErrorBody(output.body, context)];
2154
2154
  case 1:
2155
2155
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2156
2156
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2220,7 +2220,7 @@ var deserializeAws_restJson1ListCoverageStatisticsCommandError = function (outpu
2220
2220
  case 0:
2221
2221
  _a = [__assign({}, output)];
2222
2222
  _c = {};
2223
- return [4, parseBody(output.body, context)];
2223
+ return [4, parseErrorBody(output.body, context)];
2224
2224
  case 1:
2225
2225
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2226
2226
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2287,7 +2287,7 @@ var deserializeAws_restJson1ListDelegatedAdminAccountsCommandError = function (o
2287
2287
  case 0:
2288
2288
  _a = [__assign({}, output)];
2289
2289
  _c = {};
2290
- return [4, parseBody(output.body, context)];
2290
+ return [4, parseErrorBody(output.body, context)];
2291
2291
  case 1:
2292
2292
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2293
2293
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2358,7 +2358,7 @@ var deserializeAws_restJson1ListFiltersCommandError = function (output, context)
2358
2358
  case 0:
2359
2359
  _a = [__assign({}, output)];
2360
2360
  _c = {};
2361
- return [4, parseBody(output.body, context)];
2361
+ return [4, parseErrorBody(output.body, context)];
2362
2362
  case 1:
2363
2363
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2364
2364
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2432,7 +2432,7 @@ var deserializeAws_restJson1ListFindingAggregationsCommandError = function (outp
2432
2432
  case 0:
2433
2433
  _a = [__assign({}, output)];
2434
2434
  _c = {};
2435
- return [4, parseBody(output.body, context)];
2435
+ return [4, parseErrorBody(output.body, context)];
2436
2436
  case 1:
2437
2437
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2438
2438
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2499,7 +2499,7 @@ var deserializeAws_restJson1ListFindingsCommandError = function (output, context
2499
2499
  case 0:
2500
2500
  _a = [__assign({}, output)];
2501
2501
  _c = {};
2502
- return [4, parseBody(output.body, context)];
2502
+ return [4, parseErrorBody(output.body, context)];
2503
2503
  case 1:
2504
2504
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2505
2505
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2566,7 +2566,7 @@ var deserializeAws_restJson1ListMembersCommandError = function (output, context)
2566
2566
  case 0:
2567
2567
  _a = [__assign({}, output)];
2568
2568
  _c = {};
2569
- return [4, parseBody(output.body, context)];
2569
+ return [4, parseErrorBody(output.body, context)];
2570
2570
  case 1:
2571
2571
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2572
2572
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2634,7 +2634,7 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
2634
2634
  case 0:
2635
2635
  _a = [__assign({}, output)];
2636
2636
  _c = {};
2637
- return [4, parseBody(output.body, context)];
2637
+ return [4, parseErrorBody(output.body, context)];
2638
2638
  case 1:
2639
2639
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2640
2640
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2705,7 +2705,7 @@ var deserializeAws_restJson1ListUsageTotalsCommandError = function (output, cont
2705
2705
  case 0:
2706
2706
  _a = [__assign({}, output)];
2707
2707
  _c = {};
2708
- return [4, parseBody(output.body, context)];
2708
+ return [4, parseErrorBody(output.body, context)];
2709
2709
  case 1:
2710
2710
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2711
2711
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2768,7 +2768,7 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
2768
2768
  case 0:
2769
2769
  _a = [__assign({}, output)];
2770
2770
  _c = {};
2771
- return [4, parseBody(output.body, context)];
2771
+ return [4, parseErrorBody(output.body, context)];
2772
2772
  case 1:
2773
2773
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2774
2774
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2835,7 +2835,7 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
2835
2835
  case 0:
2836
2836
  _a = [__assign({}, output)];
2837
2837
  _c = {};
2838
- return [4, parseBody(output.body, context)];
2838
+ return [4, parseErrorBody(output.body, context)];
2839
2839
  case 1:
2840
2840
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2841
2841
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2898,7 +2898,7 @@ var deserializeAws_restJson1UpdateConfigurationCommandError = function (output,
2898
2898
  case 0:
2899
2899
  _a = [__assign({}, output)];
2900
2900
  _c = {};
2901
- return [4, parseBody(output.body, context)];
2901
+ return [4, parseErrorBody(output.body, context)];
2902
2902
  case 1:
2903
2903
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2904
2904
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2966,7 +2966,7 @@ var deserializeAws_restJson1UpdateFilterCommandError = function (output, context
2966
2966
  case 0:
2967
2967
  _a = [__assign({}, output)];
2968
2968
  _c = {};
2969
- return [4, parseBody(output.body, context)];
2969
+ return [4, parseErrorBody(output.body, context)];
2970
2970
  case 1:
2971
2971
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2972
2972
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3038,7 +3038,7 @@ var deserializeAws_restJson1UpdateOrganizationConfigurationCommandError = functi
3038
3038
  case 0:
3039
3039
  _a = [__assign({}, output)];
3040
3040
  _c = {};
3041
- return [4, parseBody(output.body, context)];
3041
+ return [4, parseErrorBody(output.body, context)];
3042
3042
  case 1:
3043
3043
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3044
3044
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4577,6 +4577,19 @@ var parseBody = function (streamBody, context) {
4577
4577
  return {};
4578
4578
  });
4579
4579
  };
4580
+ var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
4581
+ var value;
4582
+ var _a;
4583
+ return __generator(this, function (_b) {
4584
+ switch (_b.label) {
4585
+ case 0: return [4, parseBody(errorBody, context)];
4586
+ case 1:
4587
+ value = _b.sent();
4588
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
4589
+ return [2, value];
4590
+ }
4591
+ });
4592
+ }); };
4580
4593
  var loadRestJsonErrorCode = function (output, data) {
4581
4594
  var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
4582
4595
  var sanitizeErrorCode = function (rawValue) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-inspector2",
3
3
  "description": "AWS SDK for JavaScript Inspector2 Client for Node.js, Browser and React Native",
4
- "version": "3.180.0",
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.180.0",
22
+ "@aws-sdk/client-sts": "3.181.0",
23
23
  "@aws-sdk/config-resolver": "3.178.0",
24
- "@aws-sdk/credential-provider-node": "3.180.0",
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",