@aws-sdk/client-route53-recovery-readiness 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-route53-recovery-readiness
@@ -694,7 +694,7 @@ exports.deserializeAws_restJson1CreateCellCommand = deserializeAws_restJson1Crea
694
694
  const deserializeAws_restJson1CreateCellCommandError = async (output, context) => {
695
695
  const parsedOutput = {
696
696
  ...output,
697
- body: await parseBody(output.body, context),
697
+ body: await parseErrorBody(output.body, context),
698
698
  };
699
699
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
700
700
  switch (errorCode) {
@@ -740,7 +740,7 @@ exports.deserializeAws_restJson1CreateCrossAccountAuthorizationCommand = deseria
740
740
  const deserializeAws_restJson1CreateCrossAccountAuthorizationCommandError = async (output, context) => {
741
741
  const parsedOutput = {
742
742
  ...output,
743
- body: await parseBody(output.body, context),
743
+ body: await parseErrorBody(output.body, context),
744
744
  };
745
745
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
746
746
  switch (errorCode) {
@@ -795,7 +795,7 @@ exports.deserializeAws_restJson1CreateReadinessCheckCommand = deserializeAws_res
795
795
  const deserializeAws_restJson1CreateReadinessCheckCommandError = async (output, context) => {
796
796
  const parsedOutput = {
797
797
  ...output,
798
- body: await parseBody(output.body, context),
798
+ body: await parseErrorBody(output.body, context),
799
799
  };
800
800
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
801
801
  switch (errorCode) {
@@ -850,7 +850,7 @@ exports.deserializeAws_restJson1CreateRecoveryGroupCommand = deserializeAws_rest
850
850
  const deserializeAws_restJson1CreateRecoveryGroupCommandError = async (output, context) => {
851
851
  const parsedOutput = {
852
852
  ...output,
853
- body: await parseBody(output.body, context),
853
+ body: await parseErrorBody(output.body, context),
854
854
  };
855
855
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
856
856
  switch (errorCode) {
@@ -908,7 +908,7 @@ exports.deserializeAws_restJson1CreateResourceSetCommand = deserializeAws_restJs
908
908
  const deserializeAws_restJson1CreateResourceSetCommandError = async (output, context) => {
909
909
  const parsedOutput = {
910
910
  ...output,
911
- body: await parseBody(output.body, context),
911
+ body: await parseErrorBody(output.body, context),
912
912
  };
913
913
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
914
914
  switch (errorCode) {
@@ -951,7 +951,7 @@ exports.deserializeAws_restJson1DeleteCellCommand = deserializeAws_restJson1Dele
951
951
  const deserializeAws_restJson1DeleteCellCommandError = async (output, context) => {
952
952
  const parsedOutput = {
953
953
  ...output,
954
- body: await parseBody(output.body, context),
954
+ body: await parseErrorBody(output.body, context),
955
955
  };
956
956
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
957
957
  switch (errorCode) {
@@ -994,7 +994,7 @@ exports.deserializeAws_restJson1DeleteCrossAccountAuthorizationCommand = deseria
994
994
  const deserializeAws_restJson1DeleteCrossAccountAuthorizationCommandError = async (output, context) => {
995
995
  const parsedOutput = {
996
996
  ...output,
997
- body: await parseBody(output.body, context),
997
+ body: await parseErrorBody(output.body, context),
998
998
  };
999
999
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1000
1000
  switch (errorCode) {
@@ -1034,7 +1034,7 @@ exports.deserializeAws_restJson1DeleteReadinessCheckCommand = deserializeAws_res
1034
1034
  const deserializeAws_restJson1DeleteReadinessCheckCommandError = async (output, context) => {
1035
1035
  const parsedOutput = {
1036
1036
  ...output,
1037
- body: await parseBody(output.body, context),
1037
+ body: await parseErrorBody(output.body, context),
1038
1038
  };
1039
1039
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1040
1040
  switch (errorCode) {
@@ -1077,7 +1077,7 @@ exports.deserializeAws_restJson1DeleteRecoveryGroupCommand = deserializeAws_rest
1077
1077
  const deserializeAws_restJson1DeleteRecoveryGroupCommandError = async (output, context) => {
1078
1078
  const parsedOutput = {
1079
1079
  ...output,
1080
- body: await parseBody(output.body, context),
1080
+ body: await parseErrorBody(output.body, context),
1081
1081
  };
1082
1082
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1083
1083
  switch (errorCode) {
@@ -1120,7 +1120,7 @@ exports.deserializeAws_restJson1DeleteResourceSetCommand = deserializeAws_restJs
1120
1120
  const deserializeAws_restJson1DeleteResourceSetCommandError = async (output, context) => {
1121
1121
  const parsedOutput = {
1122
1122
  ...output,
1123
- body: await parseBody(output.body, context),
1123
+ body: await parseErrorBody(output.body, context),
1124
1124
  };
1125
1125
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1126
1126
  switch (errorCode) {
@@ -1172,7 +1172,7 @@ exports.deserializeAws_restJson1GetArchitectureRecommendationsCommand = deserial
1172
1172
  const deserializeAws_restJson1GetArchitectureRecommendationsCommandError = async (output, context) => {
1173
1173
  const parsedOutput = {
1174
1174
  ...output,
1175
- body: await parseBody(output.body, context),
1175
+ body: await parseErrorBody(output.body, context),
1176
1176
  };
1177
1177
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1178
1178
  switch (errorCode) {
@@ -1230,7 +1230,7 @@ exports.deserializeAws_restJson1GetCellCommand = deserializeAws_restJson1GetCell
1230
1230
  const deserializeAws_restJson1GetCellCommandError = async (output, context) => {
1231
1231
  const parsedOutput = {
1232
1232
  ...output,
1233
- body: await parseBody(output.body, context),
1233
+ body: await parseErrorBody(output.body, context),
1234
1234
  };
1235
1235
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1236
1236
  switch (errorCode) {
@@ -1282,7 +1282,7 @@ exports.deserializeAws_restJson1GetCellReadinessSummaryCommand = deserializeAws_
1282
1282
  const deserializeAws_restJson1GetCellReadinessSummaryCommandError = async (output, context) => {
1283
1283
  const parsedOutput = {
1284
1284
  ...output,
1285
- body: await parseBody(output.body, context),
1285
+ body: await parseErrorBody(output.body, context),
1286
1286
  };
1287
1287
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1288
1288
  switch (errorCode) {
@@ -1337,7 +1337,7 @@ exports.deserializeAws_restJson1GetReadinessCheckCommand = deserializeAws_restJs
1337
1337
  const deserializeAws_restJson1GetReadinessCheckCommandError = async (output, context) => {
1338
1338
  const parsedOutput = {
1339
1339
  ...output,
1340
- body: await parseBody(output.body, context),
1340
+ body: await parseErrorBody(output.body, context),
1341
1341
  };
1342
1342
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1343
1343
  switch (errorCode) {
@@ -1389,7 +1389,7 @@ exports.deserializeAws_restJson1GetReadinessCheckResourceStatusCommand = deseria
1389
1389
  const deserializeAws_restJson1GetReadinessCheckResourceStatusCommandError = async (output, context) => {
1390
1390
  const parsedOutput = {
1391
1391
  ...output,
1392
- body: await parseBody(output.body, context),
1392
+ body: await parseErrorBody(output.body, context),
1393
1393
  };
1394
1394
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1395
1395
  switch (errorCode) {
@@ -1444,7 +1444,7 @@ exports.deserializeAws_restJson1GetReadinessCheckStatusCommand = deserializeAws_
1444
1444
  const deserializeAws_restJson1GetReadinessCheckStatusCommandError = async (output, context) => {
1445
1445
  const parsedOutput = {
1446
1446
  ...output,
1447
- body: await parseBody(output.body, context),
1447
+ body: await parseErrorBody(output.body, context),
1448
1448
  };
1449
1449
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1450
1450
  switch (errorCode) {
@@ -1499,7 +1499,7 @@ exports.deserializeAws_restJson1GetRecoveryGroupCommand = deserializeAws_restJso
1499
1499
  const deserializeAws_restJson1GetRecoveryGroupCommandError = async (output, context) => {
1500
1500
  const parsedOutput = {
1501
1501
  ...output,
1502
- body: await parseBody(output.body, context),
1502
+ body: await parseErrorBody(output.body, context),
1503
1503
  };
1504
1504
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1505
1505
  switch (errorCode) {
@@ -1551,7 +1551,7 @@ exports.deserializeAws_restJson1GetRecoveryGroupReadinessSummaryCommand = deseri
1551
1551
  const deserializeAws_restJson1GetRecoveryGroupReadinessSummaryCommandError = async (output, context) => {
1552
1552
  const parsedOutput = {
1553
1553
  ...output,
1554
- body: await parseBody(output.body, context),
1554
+ body: await parseErrorBody(output.body, context),
1555
1555
  };
1556
1556
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1557
1557
  switch (errorCode) {
@@ -1609,7 +1609,7 @@ exports.deserializeAws_restJson1GetResourceSetCommand = deserializeAws_restJson1
1609
1609
  const deserializeAws_restJson1GetResourceSetCommandError = async (output, context) => {
1610
1610
  const parsedOutput = {
1611
1611
  ...output,
1612
- body: await parseBody(output.body, context),
1612
+ body: await parseErrorBody(output.body, context),
1613
1613
  };
1614
1614
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1615
1615
  switch (errorCode) {
@@ -1658,7 +1658,7 @@ exports.deserializeAws_restJson1ListCellsCommand = deserializeAws_restJson1ListC
1658
1658
  const deserializeAws_restJson1ListCellsCommandError = async (output, context) => {
1659
1659
  const parsedOutput = {
1660
1660
  ...output,
1661
- body: await parseBody(output.body, context),
1661
+ body: await parseErrorBody(output.body, context),
1662
1662
  };
1663
1663
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1664
1664
  switch (errorCode) {
@@ -1704,7 +1704,7 @@ exports.deserializeAws_restJson1ListCrossAccountAuthorizationsCommand = deserial
1704
1704
  const deserializeAws_restJson1ListCrossAccountAuthorizationsCommandError = async (output, context) => {
1705
1705
  const parsedOutput = {
1706
1706
  ...output,
1707
- body: await parseBody(output.body, context),
1707
+ body: await parseErrorBody(output.body, context),
1708
1708
  };
1709
1709
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1710
1710
  switch (errorCode) {
@@ -1750,7 +1750,7 @@ exports.deserializeAws_restJson1ListReadinessChecksCommand = deserializeAws_rest
1750
1750
  const deserializeAws_restJson1ListReadinessChecksCommandError = async (output, context) => {
1751
1751
  const parsedOutput = {
1752
1752
  ...output,
1753
- body: await parseBody(output.body, context),
1753
+ body: await parseErrorBody(output.body, context),
1754
1754
  };
1755
1755
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1756
1756
  switch (errorCode) {
@@ -1796,7 +1796,7 @@ exports.deserializeAws_restJson1ListRecoveryGroupsCommand = deserializeAws_restJ
1796
1796
  const deserializeAws_restJson1ListRecoveryGroupsCommandError = async (output, context) => {
1797
1797
  const parsedOutput = {
1798
1798
  ...output,
1799
- body: await parseBody(output.body, context),
1799
+ body: await parseErrorBody(output.body, context),
1800
1800
  };
1801
1801
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1802
1802
  switch (errorCode) {
@@ -1842,7 +1842,7 @@ exports.deserializeAws_restJson1ListResourceSetsCommand = deserializeAws_restJso
1842
1842
  const deserializeAws_restJson1ListResourceSetsCommandError = async (output, context) => {
1843
1843
  const parsedOutput = {
1844
1844
  ...output,
1845
- body: await parseBody(output.body, context),
1845
+ body: await parseErrorBody(output.body, context),
1846
1846
  };
1847
1847
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1848
1848
  switch (errorCode) {
@@ -1888,7 +1888,7 @@ exports.deserializeAws_restJson1ListRulesCommand = deserializeAws_restJson1ListR
1888
1888
  const deserializeAws_restJson1ListRulesCommandError = async (output, context) => {
1889
1889
  const parsedOutput = {
1890
1890
  ...output,
1891
- body: await parseBody(output.body, context),
1891
+ body: await parseErrorBody(output.body, context),
1892
1892
  };
1893
1893
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1894
1894
  switch (errorCode) {
@@ -1931,7 +1931,7 @@ exports.deserializeAws_restJson1ListTagsForResourcesCommand = deserializeAws_res
1931
1931
  const deserializeAws_restJson1ListTagsForResourcesCommandError = async (output, context) => {
1932
1932
  const parsedOutput = {
1933
1933
  ...output,
1934
- body: await parseBody(output.body, context),
1934
+ body: await parseErrorBody(output.body, context),
1935
1935
  };
1936
1936
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1937
1937
  switch (errorCode) {
@@ -1968,7 +1968,7 @@ exports.deserializeAws_restJson1TagResourceCommand = deserializeAws_restJson1Tag
1968
1968
  const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
1969
1969
  const parsedOutput = {
1970
1970
  ...output,
1971
- body: await parseBody(output.body, context),
1971
+ body: await parseErrorBody(output.body, context),
1972
1972
  };
1973
1973
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1974
1974
  switch (errorCode) {
@@ -2005,7 +2005,7 @@ exports.deserializeAws_restJson1UntagResourceCommand = deserializeAws_restJson1U
2005
2005
  const deserializeAws_restJson1UntagResourceCommandError = 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) {
@@ -2057,7 +2057,7 @@ exports.deserializeAws_restJson1UpdateCellCommand = deserializeAws_restJson1Upda
2057
2057
  const deserializeAws_restJson1UpdateCellCommandError = async (output, context) => {
2058
2058
  const parsedOutput = {
2059
2059
  ...output,
2060
- body: await parseBody(output.body, context),
2060
+ body: await parseErrorBody(output.body, context),
2061
2061
  };
2062
2062
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2063
2063
  switch (errorCode) {
@@ -2112,7 +2112,7 @@ exports.deserializeAws_restJson1UpdateReadinessCheckCommand = deserializeAws_res
2112
2112
  const deserializeAws_restJson1UpdateReadinessCheckCommandError = async (output, context) => {
2113
2113
  const parsedOutput = {
2114
2114
  ...output,
2115
- body: await parseBody(output.body, context),
2115
+ body: await parseErrorBody(output.body, context),
2116
2116
  };
2117
2117
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2118
2118
  switch (errorCode) {
@@ -2167,7 +2167,7 @@ exports.deserializeAws_restJson1UpdateRecoveryGroupCommand = deserializeAws_rest
2167
2167
  const deserializeAws_restJson1UpdateRecoveryGroupCommandError = async (output, context) => {
2168
2168
  const parsedOutput = {
2169
2169
  ...output,
2170
- body: await parseBody(output.body, context),
2170
+ body: await parseErrorBody(output.body, context),
2171
2171
  };
2172
2172
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2173
2173
  switch (errorCode) {
@@ -2225,7 +2225,7 @@ exports.deserializeAws_restJson1UpdateResourceSetCommand = deserializeAws_restJs
2225
2225
  const deserializeAws_restJson1UpdateResourceSetCommandError = async (output, context) => {
2226
2226
  const parsedOutput = {
2227
2227
  ...output,
2228
- body: await parseBody(output.body, context),
2228
+ body: await parseErrorBody(output.body, context),
2229
2229
  };
2230
2230
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2231
2231
  switch (errorCode) {
@@ -2694,6 +2694,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
2694
2694
  }
2695
2695
  return {};
2696
2696
  });
2697
+ const parseErrorBody = async (errorBody, context) => {
2698
+ var _a;
2699
+ const value = await parseBody(errorBody, context);
2700
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
2701
+ return value;
2702
+ };
2697
2703
  const loadRestJsonErrorCode = (output, data) => {
2698
2704
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
2699
2705
  const sanitizeErrorCode = (rawValue) => {
@@ -835,7 +835,7 @@ var deserializeAws_restJson1CreateCellCommandError = function (output, context)
835
835
  case 0:
836
836
  _a = [__assign({}, output)];
837
837
  _c = {};
838
- return [4, parseBody(output.body, context)];
838
+ return [4, parseErrorBody(output.body, context)];
839
839
  case 1:
840
840
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
841
841
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -907,7 +907,7 @@ var deserializeAws_restJson1CreateCrossAccountAuthorizationCommandError = functi
907
907
  case 0:
908
908
  _a = [__assign({}, output)];
909
909
  _c = {};
910
- return [4, parseBody(output.body, context)];
910
+ return [4, parseErrorBody(output.body, context)];
911
911
  case 1:
912
912
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
913
913
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -988,7 +988,7 @@ var deserializeAws_restJson1CreateReadinessCheckCommandError = function (output,
988
988
  case 0:
989
989
  _a = [__assign({}, output)];
990
990
  _c = {};
991
- return [4, parseBody(output.body, context)];
991
+ return [4, parseErrorBody(output.body, context)];
992
992
  case 1:
993
993
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
994
994
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1069,7 +1069,7 @@ var deserializeAws_restJson1CreateRecoveryGroupCommandError = function (output,
1069
1069
  case 0:
1070
1070
  _a = [__assign({}, output)];
1071
1071
  _c = {};
1072
- return [4, parseBody(output.body, context)];
1072
+ return [4, parseErrorBody(output.body, context)];
1073
1073
  case 1:
1074
1074
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1075
1075
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1153,7 +1153,7 @@ var deserializeAws_restJson1CreateResourceSetCommandError = function (output, co
1153
1153
  case 0:
1154
1154
  _a = [__assign({}, output)];
1155
1155
  _c = {};
1156
- return [4, parseBody(output.body, context)];
1156
+ return [4, parseErrorBody(output.body, context)];
1157
1157
  case 1:
1158
1158
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1159
1159
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1220,7 +1220,7 @@ var deserializeAws_restJson1DeleteCellCommandError = function (output, context)
1220
1220
  case 0:
1221
1221
  _a = [__assign({}, output)];
1222
1222
  _c = {};
1223
- return [4, parseBody(output.body, context)];
1223
+ return [4, parseErrorBody(output.body, context)];
1224
1224
  case 1:
1225
1225
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1226
1226
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1287,7 +1287,7 @@ var deserializeAws_restJson1DeleteCrossAccountAuthorizationCommandError = functi
1287
1287
  case 0:
1288
1288
  _a = [__assign({}, output)];
1289
1289
  _c = {};
1290
- return [4, parseBody(output.body, context)];
1290
+ return [4, parseErrorBody(output.body, context)];
1291
1291
  case 1:
1292
1292
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1293
1293
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1350,7 +1350,7 @@ var deserializeAws_restJson1DeleteReadinessCheckCommandError = function (output,
1350
1350
  case 0:
1351
1351
  _a = [__assign({}, output)];
1352
1352
  _c = {};
1353
- return [4, parseBody(output.body, context)];
1353
+ return [4, parseErrorBody(output.body, context)];
1354
1354
  case 1:
1355
1355
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1356
1356
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1417,7 +1417,7 @@ var deserializeAws_restJson1DeleteRecoveryGroupCommandError = function (output,
1417
1417
  case 0:
1418
1418
  _a = [__assign({}, output)];
1419
1419
  _c = {};
1420
- return [4, parseBody(output.body, context)];
1420
+ return [4, parseErrorBody(output.body, context)];
1421
1421
  case 1:
1422
1422
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1423
1423
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1484,7 +1484,7 @@ var deserializeAws_restJson1DeleteResourceSetCommandError = function (output, co
1484
1484
  case 0:
1485
1485
  _a = [__assign({}, output)];
1486
1486
  _c = {};
1487
- return [4, parseBody(output.body, context)];
1487
+ return [4, parseErrorBody(output.body, context)];
1488
1488
  case 1:
1489
1489
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1490
1490
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1562,7 +1562,7 @@ var deserializeAws_restJson1GetArchitectureRecommendationsCommandError = functio
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);
@@ -1646,7 +1646,7 @@ var deserializeAws_restJson1GetCellCommandError = function (output, context) { r
1646
1646
  case 0:
1647
1647
  _a = [__assign({}, output)];
1648
1648
  _c = {};
1649
- return [4, parseBody(output.body, context)];
1649
+ return [4, parseErrorBody(output.body, context)];
1650
1650
  case 1:
1651
1651
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1652
1652
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1724,7 +1724,7 @@ var deserializeAws_restJson1GetCellReadinessSummaryCommandError = function (outp
1724
1724
  case 0:
1725
1725
  _a = [__assign({}, output)];
1726
1726
  _c = {};
1727
- return [4, parseBody(output.body, context)];
1727
+ return [4, parseErrorBody(output.body, context)];
1728
1728
  case 1:
1729
1729
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1730
1730
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1805,7 +1805,7 @@ var deserializeAws_restJson1GetReadinessCheckCommandError = function (output, co
1805
1805
  case 0:
1806
1806
  _a = [__assign({}, output)];
1807
1807
  _c = {};
1808
- return [4, parseBody(output.body, context)];
1808
+ return [4, parseErrorBody(output.body, context)];
1809
1809
  case 1:
1810
1810
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1811
1811
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1883,7 +1883,7 @@ var deserializeAws_restJson1GetReadinessCheckResourceStatusCommandError = functi
1883
1883
  case 0:
1884
1884
  _a = [__assign({}, output)];
1885
1885
  _c = {};
1886
- return [4, parseBody(output.body, context)];
1886
+ return [4, parseErrorBody(output.body, context)];
1887
1887
  case 1:
1888
1888
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1889
1889
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1964,7 +1964,7 @@ var deserializeAws_restJson1GetReadinessCheckStatusCommandError = function (outp
1964
1964
  case 0:
1965
1965
  _a = [__assign({}, output)];
1966
1966
  _c = {};
1967
- return [4, parseBody(output.body, context)];
1967
+ return [4, parseErrorBody(output.body, context)];
1968
1968
  case 1:
1969
1969
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1970
1970
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2045,7 +2045,7 @@ var deserializeAws_restJson1GetRecoveryGroupCommandError = function (output, con
2045
2045
  case 0:
2046
2046
  _a = [__assign({}, output)];
2047
2047
  _c = {};
2048
- return [4, parseBody(output.body, context)];
2048
+ return [4, parseErrorBody(output.body, context)];
2049
2049
  case 1:
2050
2050
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2051
2051
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2123,7 +2123,7 @@ var deserializeAws_restJson1GetRecoveryGroupReadinessSummaryCommandError = funct
2123
2123
  case 0:
2124
2124
  _a = [__assign({}, output)];
2125
2125
  _c = {};
2126
- return [4, parseBody(output.body, context)];
2126
+ return [4, parseErrorBody(output.body, context)];
2127
2127
  case 1:
2128
2128
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2129
2129
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2207,7 +2207,7 @@ var deserializeAws_restJson1GetResourceSetCommandError = function (output, conte
2207
2207
  case 0:
2208
2208
  _a = [__assign({}, output)];
2209
2209
  _c = {};
2210
- return [4, parseBody(output.body, context)];
2210
+ return [4, parseErrorBody(output.body, context)];
2211
2211
  case 1:
2212
2212
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2213
2213
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2282,7 +2282,7 @@ var deserializeAws_restJson1ListCellsCommandError = function (output, context) {
2282
2282
  case 0:
2283
2283
  _a = [__assign({}, output)];
2284
2284
  _c = {};
2285
- return [4, parseBody(output.body, context)];
2285
+ return [4, parseErrorBody(output.body, context)];
2286
2286
  case 1:
2287
2287
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2288
2288
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2353,7 +2353,7 @@ var deserializeAws_restJson1ListCrossAccountAuthorizationsCommandError = functio
2353
2353
  case 0:
2354
2354
  _a = [__assign({}, output)];
2355
2355
  _c = {};
2356
- return [4, parseBody(output.body, context)];
2356
+ return [4, parseErrorBody(output.body, context)];
2357
2357
  case 1:
2358
2358
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2359
2359
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2424,7 +2424,7 @@ var deserializeAws_restJson1ListReadinessChecksCommandError = function (output,
2424
2424
  case 0:
2425
2425
  _a = [__assign({}, output)];
2426
2426
  _c = {};
2427
- return [4, parseBody(output.body, context)];
2427
+ return [4, parseErrorBody(output.body, context)];
2428
2428
  case 1:
2429
2429
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2430
2430
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2495,7 +2495,7 @@ var deserializeAws_restJson1ListRecoveryGroupsCommandError = function (output, c
2495
2495
  case 0:
2496
2496
  _a = [__assign({}, output)];
2497
2497
  _c = {};
2498
- return [4, parseBody(output.body, context)];
2498
+ return [4, parseErrorBody(output.body, context)];
2499
2499
  case 1:
2500
2500
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2501
2501
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2566,7 +2566,7 @@ var deserializeAws_restJson1ListResourceSetsCommandError = function (output, con
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);
@@ -2637,7 +2637,7 @@ var deserializeAws_restJson1ListRulesCommandError = function (output, context) {
2637
2637
  case 0:
2638
2638
  _a = [__assign({}, output)];
2639
2639
  _c = {};
2640
- return [4, parseBody(output.body, context)];
2640
+ return [4, parseErrorBody(output.body, context)];
2641
2641
  case 1:
2642
2642
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2643
2643
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2705,7 +2705,7 @@ var deserializeAws_restJson1ListTagsForResourcesCommandError = function (output,
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);
@@ -2764,7 +2764,7 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
2764
2764
  case 0:
2765
2765
  _a = [__assign({}, output)];
2766
2766
  _c = {};
2767
- return [4, parseBody(output.body, context)];
2767
+ return [4, parseErrorBody(output.body, context)];
2768
2768
  case 1:
2769
2769
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2770
2770
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2823,7 +2823,7 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
2823
2823
  case 0:
2824
2824
  _a = [__assign({}, output)];
2825
2825
  _c = {};
2826
- return [4, parseBody(output.body, context)];
2826
+ return [4, parseErrorBody(output.body, context)];
2827
2827
  case 1:
2828
2828
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2829
2829
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2899,7 +2899,7 @@ var deserializeAws_restJson1UpdateCellCommandError = function (output, context)
2899
2899
  case 0:
2900
2900
  _a = [__assign({}, output)];
2901
2901
  _c = {};
2902
- return [4, parseBody(output.body, context)];
2902
+ return [4, parseErrorBody(output.body, context)];
2903
2903
  case 1:
2904
2904
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2905
2905
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2980,7 +2980,7 @@ var deserializeAws_restJson1UpdateReadinessCheckCommandError = function (output,
2980
2980
  case 0:
2981
2981
  _a = [__assign({}, output)];
2982
2982
  _c = {};
2983
- return [4, parseBody(output.body, context)];
2983
+ return [4, parseErrorBody(output.body, context)];
2984
2984
  case 1:
2985
2985
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2986
2986
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3061,7 +3061,7 @@ var deserializeAws_restJson1UpdateRecoveryGroupCommandError = function (output,
3061
3061
  case 0:
3062
3062
  _a = [__assign({}, output)];
3063
3063
  _c = {};
3064
- return [4, parseBody(output.body, context)];
3064
+ return [4, parseErrorBody(output.body, context)];
3065
3065
  case 1:
3066
3066
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3067
3067
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3145,7 +3145,7 @@ var deserializeAws_restJson1UpdateResourceSetCommandError = function (output, co
3145
3145
  case 0:
3146
3146
  _a = [__assign({}, output)];
3147
3147
  _c = {};
3148
- return [4, parseBody(output.body, context)];
3148
+ return [4, parseErrorBody(output.body, context)];
3149
3149
  case 1:
3150
3150
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3151
3151
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3612,6 +3612,19 @@ var parseBody = function (streamBody, context) {
3612
3612
  return {};
3613
3613
  });
3614
3614
  };
3615
+ var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
3616
+ var value;
3617
+ var _a;
3618
+ return __generator(this, function (_b) {
3619
+ switch (_b.label) {
3620
+ case 0: return [4, parseBody(errorBody, context)];
3621
+ case 1:
3622
+ value = _b.sent();
3623
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
3624
+ return [2, value];
3625
+ }
3626
+ });
3627
+ }); };
3615
3628
  var loadRestJsonErrorCode = function (output, data) {
3616
3629
  var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
3617
3630
  var sanitizeErrorCode = function (rawValue) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-route53-recovery-readiness",
3
3
  "description": "AWS SDK for JavaScript Route53 Recovery Readiness 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",