@aws-sdk/client-mgn 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-mgn
@@ -871,7 +871,7 @@ exports.deserializeAws_restJson1ChangeServerLifeCycleStateCommand = deserializeA
871
871
  const deserializeAws_restJson1ChangeServerLifeCycleStateCommandError = async (output, context) => {
872
872
  const parsedOutput = {
873
873
  ...output,
874
- body: await parseBody(output.body, context),
874
+ body: await parseErrorBody(output.body, context),
875
875
  };
876
876
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
877
877
  switch (errorCode) {
@@ -923,7 +923,7 @@ exports.deserializeAws_restJson1CreateLaunchConfigurationTemplateCommand = deser
923
923
  const deserializeAws_restJson1CreateLaunchConfigurationTemplateCommandError = async (output, context) => {
924
924
  const parsedOutput = {
925
925
  ...output,
926
- body: await parseBody(output.body, context),
926
+ body: await parseErrorBody(output.body, context),
927
927
  };
928
928
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
929
929
  switch (errorCode) {
@@ -1005,7 +1005,7 @@ exports.deserializeAws_restJson1CreateReplicationConfigurationTemplateCommand =
1005
1005
  const deserializeAws_restJson1CreateReplicationConfigurationTemplateCommandError = async (output, context) => {
1006
1006
  const parsedOutput = {
1007
1007
  ...output,
1008
- body: await parseBody(output.body, context),
1008
+ body: await parseErrorBody(output.body, context),
1009
1009
  };
1010
1010
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1011
1011
  switch (errorCode) {
@@ -1042,7 +1042,7 @@ exports.deserializeAws_restJson1DeleteJobCommand = deserializeAws_restJson1Delet
1042
1042
  const deserializeAws_restJson1DeleteJobCommandError = async (output, context) => {
1043
1043
  const parsedOutput = {
1044
1044
  ...output,
1045
- body: await parseBody(output.body, context),
1045
+ body: await parseErrorBody(output.body, context),
1046
1046
  };
1047
1047
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1048
1048
  switch (errorCode) {
@@ -1079,7 +1079,7 @@ exports.deserializeAws_restJson1DeleteLaunchConfigurationTemplateCommand = deser
1079
1079
  const deserializeAws_restJson1DeleteLaunchConfigurationTemplateCommandError = async (output, context) => {
1080
1080
  const parsedOutput = {
1081
1081
  ...output,
1082
- body: await parseBody(output.body, context),
1082
+ body: await parseErrorBody(output.body, context),
1083
1083
  };
1084
1084
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1085
1085
  switch (errorCode) {
@@ -1116,7 +1116,7 @@ exports.deserializeAws_restJson1DeleteReplicationConfigurationTemplateCommand =
1116
1116
  const deserializeAws_restJson1DeleteReplicationConfigurationTemplateCommandError = async (output, context) => {
1117
1117
  const parsedOutput = {
1118
1118
  ...output,
1119
- body: await parseBody(output.body, context),
1119
+ body: await parseErrorBody(output.body, context),
1120
1120
  };
1121
1121
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1122
1122
  switch (errorCode) {
@@ -1153,7 +1153,7 @@ exports.deserializeAws_restJson1DeleteSourceServerCommand = deserializeAws_restJ
1153
1153
  const deserializeAws_restJson1DeleteSourceServerCommandError = async (output, context) => {
1154
1154
  const parsedOutput = {
1155
1155
  ...output,
1156
- body: await parseBody(output.body, context),
1156
+ body: await parseErrorBody(output.body, context),
1157
1157
  };
1158
1158
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1159
1159
  switch (errorCode) {
@@ -1190,7 +1190,7 @@ exports.deserializeAws_restJson1DeleteVcenterClientCommand = deserializeAws_rest
1190
1190
  const deserializeAws_restJson1DeleteVcenterClientCommandError = async (output, context) => {
1191
1191
  const parsedOutput = {
1192
1192
  ...output,
1193
- body: await parseBody(output.body, context),
1193
+ body: await parseErrorBody(output.body, context),
1194
1194
  };
1195
1195
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1196
1196
  switch (errorCode) {
@@ -1233,7 +1233,7 @@ exports.deserializeAws_restJson1DescribeJobLogItemsCommand = deserializeAws_rest
1233
1233
  const deserializeAws_restJson1DescribeJobLogItemsCommandError = async (output, context) => {
1234
1234
  const parsedOutput = {
1235
1235
  ...output,
1236
- body: await parseBody(output.body, context),
1236
+ body: await parseErrorBody(output.body, context),
1237
1237
  };
1238
1238
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1239
1239
  switch (errorCode) {
@@ -1273,7 +1273,7 @@ exports.deserializeAws_restJson1DescribeJobsCommand = deserializeAws_restJson1De
1273
1273
  const deserializeAws_restJson1DescribeJobsCommandError = async (output, context) => {
1274
1274
  const parsedOutput = {
1275
1275
  ...output,
1276
- body: await parseBody(output.body, context),
1276
+ body: await parseErrorBody(output.body, context),
1277
1277
  };
1278
1278
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1279
1279
  switch (errorCode) {
@@ -1313,7 +1313,7 @@ exports.deserializeAws_restJson1DescribeLaunchConfigurationTemplatesCommand = de
1313
1313
  const deserializeAws_restJson1DescribeLaunchConfigurationTemplatesCommandError = async (output, context) => {
1314
1314
  const parsedOutput = {
1315
1315
  ...output,
1316
- body: await parseBody(output.body, context),
1316
+ body: await parseErrorBody(output.body, context),
1317
1317
  };
1318
1318
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1319
1319
  switch (errorCode) {
@@ -1356,7 +1356,7 @@ exports.deserializeAws_restJson1DescribeReplicationConfigurationTemplatesCommand
1356
1356
  const deserializeAws_restJson1DescribeReplicationConfigurationTemplatesCommandError = async (output, context) => {
1357
1357
  const parsedOutput = {
1358
1358
  ...output,
1359
- body: await parseBody(output.body, context),
1359
+ body: await parseErrorBody(output.body, context),
1360
1360
  };
1361
1361
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1362
1362
  switch (errorCode) {
@@ -1399,7 +1399,7 @@ exports.deserializeAws_restJson1DescribeSourceServersCommand = deserializeAws_re
1399
1399
  const deserializeAws_restJson1DescribeSourceServersCommandError = async (output, context) => {
1400
1400
  const parsedOutput = {
1401
1401
  ...output,
1402
- body: await parseBody(output.body, context),
1402
+ body: await parseErrorBody(output.body, context),
1403
1403
  };
1404
1404
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1405
1405
  switch (errorCode) {
@@ -1439,7 +1439,7 @@ exports.deserializeAws_restJson1DescribeVcenterClientsCommand = deserializeAws_r
1439
1439
  const deserializeAws_restJson1DescribeVcenterClientsCommandError = async (output, context) => {
1440
1440
  const parsedOutput = {
1441
1441
  ...output,
1442
- body: await parseBody(output.body, context),
1442
+ body: await parseErrorBody(output.body, context),
1443
1443
  };
1444
1444
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1445
1445
  switch (errorCode) {
@@ -1506,7 +1506,7 @@ exports.deserializeAws_restJson1DisconnectFromServiceCommand = deserializeAws_re
1506
1506
  const deserializeAws_restJson1DisconnectFromServiceCommandError = async (output, context) => {
1507
1507
  const parsedOutput = {
1508
1508
  ...output,
1509
- body: await parseBody(output.body, context),
1509
+ body: await parseErrorBody(output.body, context),
1510
1510
  };
1511
1511
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1512
1512
  switch (errorCode) {
@@ -1573,7 +1573,7 @@ exports.deserializeAws_restJson1FinalizeCutoverCommand = deserializeAws_restJson
1573
1573
  const deserializeAws_restJson1FinalizeCutoverCommandError = async (output, context) => {
1574
1574
  const parsedOutput = {
1575
1575
  ...output,
1576
- body: await parseBody(output.body, context),
1576
+ body: await parseErrorBody(output.body, context),
1577
1577
  };
1578
1578
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1579
1579
  switch (errorCode) {
@@ -1643,7 +1643,7 @@ exports.deserializeAws_restJson1GetLaunchConfigurationCommand = deserializeAws_r
1643
1643
  const deserializeAws_restJson1GetLaunchConfigurationCommandError = async (output, context) => {
1644
1644
  const parsedOutput = {
1645
1645
  ...output,
1646
- body: await parseBody(output.body, context),
1646
+ body: await parseErrorBody(output.body, context),
1647
1647
  };
1648
1648
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1649
1649
  switch (errorCode) {
@@ -1722,7 +1722,7 @@ exports.deserializeAws_restJson1GetReplicationConfigurationCommand = deserialize
1722
1722
  const deserializeAws_restJson1GetReplicationConfigurationCommandError = async (output, context) => {
1723
1723
  const parsedOutput = {
1724
1724
  ...output,
1725
- body: await parseBody(output.body, context),
1725
+ body: await parseErrorBody(output.body, context),
1726
1726
  };
1727
1727
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1728
1728
  switch (errorCode) {
@@ -1756,7 +1756,7 @@ exports.deserializeAws_restJson1InitializeServiceCommand = deserializeAws_restJs
1756
1756
  const deserializeAws_restJson1InitializeServiceCommandError = async (output, context) => {
1757
1757
  const parsedOutput = {
1758
1758
  ...output,
1759
- body: await parseBody(output.body, context),
1759
+ body: await parseErrorBody(output.body, context),
1760
1760
  };
1761
1761
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1762
1762
  switch (errorCode) {
@@ -1793,7 +1793,7 @@ exports.deserializeAws_restJson1ListTagsForResourceCommand = deserializeAws_rest
1793
1793
  const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
1794
1794
  const parsedOutput = {
1795
1795
  ...output,
1796
- body: await parseBody(output.body, context),
1796
+ body: await parseErrorBody(output.body, context),
1797
1797
  };
1798
1798
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1799
1799
  switch (errorCode) {
@@ -1866,7 +1866,7 @@ exports.deserializeAws_restJson1MarkAsArchivedCommand = deserializeAws_restJson1
1866
1866
  const deserializeAws_restJson1MarkAsArchivedCommandError = async (output, context) => {
1867
1867
  const parsedOutput = {
1868
1868
  ...output,
1869
- body: await parseBody(output.body, context),
1869
+ body: await parseErrorBody(output.body, context),
1870
1870
  };
1871
1871
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1872
1872
  switch (errorCode) {
@@ -1933,7 +1933,7 @@ exports.deserializeAws_restJson1RetryDataReplicationCommand = deserializeAws_res
1933
1933
  const deserializeAws_restJson1RetryDataReplicationCommandError = async (output, context) => {
1934
1934
  const parsedOutput = {
1935
1935
  ...output,
1936
- body: await parseBody(output.body, context),
1936
+ body: await parseErrorBody(output.body, context),
1937
1937
  };
1938
1938
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1939
1939
  switch (errorCode) {
@@ -1973,7 +1973,7 @@ exports.deserializeAws_restJson1StartCutoverCommand = deserializeAws_restJson1St
1973
1973
  const deserializeAws_restJson1StartCutoverCommandError = async (output, context) => {
1974
1974
  const parsedOutput = {
1975
1975
  ...output,
1976
- body: await parseBody(output.body, context),
1976
+ body: await parseErrorBody(output.body, context),
1977
1977
  };
1978
1978
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1979
1979
  switch (errorCode) {
@@ -2040,7 +2040,7 @@ exports.deserializeAws_restJson1StartReplicationCommand = deserializeAws_restJso
2040
2040
  const deserializeAws_restJson1StartReplicationCommandError = async (output, context) => {
2041
2041
  const parsedOutput = {
2042
2042
  ...output,
2043
- body: await parseBody(output.body, context),
2043
+ body: await parseErrorBody(output.body, context),
2044
2044
  };
2045
2045
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2046
2046
  switch (errorCode) {
@@ -2086,7 +2086,7 @@ exports.deserializeAws_restJson1StartTestCommand = deserializeAws_restJson1Start
2086
2086
  const deserializeAws_restJson1StartTestCommandError = async (output, context) => {
2087
2087
  const parsedOutput = {
2088
2088
  ...output,
2089
- body: await parseBody(output.body, context),
2089
+ body: await parseErrorBody(output.body, context),
2090
2090
  };
2091
2091
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2092
2092
  switch (errorCode) {
@@ -2123,7 +2123,7 @@ exports.deserializeAws_restJson1TagResourceCommand = deserializeAws_restJson1Tag
2123
2123
  const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
2124
2124
  const parsedOutput = {
2125
2125
  ...output,
2126
- body: await parseBody(output.body, context),
2126
+ body: await parseErrorBody(output.body, context),
2127
2127
  };
2128
2128
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2129
2129
  switch (errorCode) {
@@ -2169,7 +2169,7 @@ exports.deserializeAws_restJson1TerminateTargetInstancesCommand = deserializeAws
2169
2169
  const deserializeAws_restJson1TerminateTargetInstancesCommandError = async (output, context) => {
2170
2170
  const parsedOutput = {
2171
2171
  ...output,
2172
- body: await parseBody(output.body, context),
2172
+ body: await parseErrorBody(output.body, context),
2173
2173
  };
2174
2174
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2175
2175
  switch (errorCode) {
@@ -2206,7 +2206,7 @@ exports.deserializeAws_restJson1UntagResourceCommand = deserializeAws_restJson1U
2206
2206
  const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
2207
2207
  const parsedOutput = {
2208
2208
  ...output,
2209
- body: await parseBody(output.body, context),
2209
+ body: await parseErrorBody(output.body, context),
2210
2210
  };
2211
2211
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2212
2212
  switch (errorCode) {
@@ -2279,7 +2279,7 @@ exports.deserializeAws_restJson1UpdateLaunchConfigurationCommand = deserializeAw
2279
2279
  const deserializeAws_restJson1UpdateLaunchConfigurationCommandError = async (output, context) => {
2280
2280
  const parsedOutput = {
2281
2281
  ...output,
2282
- body: await parseBody(output.body, context),
2282
+ body: await parseErrorBody(output.body, context),
2283
2283
  };
2284
2284
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2285
2285
  switch (errorCode) {
@@ -2331,7 +2331,7 @@ exports.deserializeAws_restJson1UpdateLaunchConfigurationTemplateCommand = deser
2331
2331
  const deserializeAws_restJson1UpdateLaunchConfigurationTemplateCommandError = async (output, context) => {
2332
2332
  const parsedOutput = {
2333
2333
  ...output,
2334
- body: await parseBody(output.body, context),
2334
+ body: await parseErrorBody(output.body, context),
2335
2335
  };
2336
2336
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2337
2337
  switch (errorCode) {
@@ -2416,7 +2416,7 @@ exports.deserializeAws_restJson1UpdateReplicationConfigurationCommand = deserial
2416
2416
  const deserializeAws_restJson1UpdateReplicationConfigurationCommandError = async (output, context) => {
2417
2417
  const parsedOutput = {
2418
2418
  ...output,
2419
- body: await parseBody(output.body, context),
2419
+ body: await parseErrorBody(output.body, context),
2420
2420
  };
2421
2421
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2422
2422
  switch (errorCode) {
@@ -2504,7 +2504,7 @@ exports.deserializeAws_restJson1UpdateReplicationConfigurationTemplateCommand =
2504
2504
  const deserializeAws_restJson1UpdateReplicationConfigurationTemplateCommandError = async (output, context) => {
2505
2505
  const parsedOutput = {
2506
2506
  ...output,
2507
- body: await parseBody(output.body, context),
2507
+ body: await parseErrorBody(output.body, context),
2508
2508
  };
2509
2509
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2510
2510
  switch (errorCode) {
@@ -2574,7 +2574,7 @@ exports.deserializeAws_restJson1UpdateSourceServerReplicationTypeCommand = deser
2574
2574
  const deserializeAws_restJson1UpdateSourceServerReplicationTypeCommandError = async (output, context) => {
2575
2575
  const parsedOutput = {
2576
2576
  ...output,
2577
- body: await parseBody(output.body, context),
2577
+ body: await parseErrorBody(output.body, context),
2578
2578
  };
2579
2579
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2580
2580
  switch (errorCode) {
@@ -3558,6 +3558,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
3558
3558
  }
3559
3559
  return {};
3560
3560
  });
3561
+ const parseErrorBody = async (errorBody, context) => {
3562
+ var _a;
3563
+ const value = await parseBody(errorBody, context);
3564
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
3565
+ return value;
3566
+ };
3561
3567
  const loadRestJsonErrorCode = (output, data) => {
3562
3568
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
3563
3569
  const sanitizeErrorCode = (rawValue) => {
@@ -925,7 +925,7 @@ var deserializeAws_restJson1ChangeServerLifeCycleStateCommandError = function (o
925
925
  case 0:
926
926
  _a = [__assign({}, output)];
927
927
  _c = {};
928
- return [4, parseBody(output.body, context)];
928
+ return [4, parseErrorBody(output.body, context)];
929
929
  case 1:
930
930
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
931
931
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1002,7 +1002,7 @@ var deserializeAws_restJson1CreateLaunchConfigurationTemplateCommandError = func
1002
1002
  case 0:
1003
1003
  _a = [__assign({}, output)];
1004
1004
  _c = {};
1005
- return [4, parseBody(output.body, context)];
1005
+ return [4, parseErrorBody(output.body, context)];
1006
1006
  case 1:
1007
1007
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1008
1008
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1108,7 +1108,7 @@ var deserializeAws_restJson1CreateReplicationConfigurationTemplateCommandError =
1108
1108
  case 0:
1109
1109
  _a = [__assign({}, output)];
1110
1110
  _c = {};
1111
- return [4, parseBody(output.body, context)];
1111
+ return [4, parseErrorBody(output.body, context)];
1112
1112
  case 1:
1113
1113
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1114
1114
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1167,7 +1167,7 @@ var deserializeAws_restJson1DeleteJobCommandError = function (output, context) {
1167
1167
  case 0:
1168
1168
  _a = [__assign({}, output)];
1169
1169
  _c = {};
1170
- return [4, parseBody(output.body, context)];
1170
+ return [4, parseErrorBody(output.body, context)];
1171
1171
  case 1:
1172
1172
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1173
1173
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1226,7 +1226,7 @@ var deserializeAws_restJson1DeleteLaunchConfigurationTemplateCommandError = func
1226
1226
  case 0:
1227
1227
  _a = [__assign({}, output)];
1228
1228
  _c = {};
1229
- return [4, parseBody(output.body, context)];
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);
@@ -1285,7 +1285,7 @@ var deserializeAws_restJson1DeleteReplicationConfigurationTemplateCommandError =
1285
1285
  case 0:
1286
1286
  _a = [__assign({}, output)];
1287
1287
  _c = {};
1288
- return [4, parseBody(output.body, context)];
1288
+ return [4, parseErrorBody(output.body, context)];
1289
1289
  case 1:
1290
1290
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1291
1291
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1344,7 +1344,7 @@ var deserializeAws_restJson1DeleteSourceServerCommandError = function (output, c
1344
1344
  case 0:
1345
1345
  _a = [__assign({}, output)];
1346
1346
  _c = {};
1347
- return [4, parseBody(output.body, context)];
1347
+ return [4, parseErrorBody(output.body, context)];
1348
1348
  case 1:
1349
1349
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1350
1350
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1403,7 +1403,7 @@ var deserializeAws_restJson1DeleteVcenterClientCommandError = function (output,
1403
1403
  case 0:
1404
1404
  _a = [__assign({}, output)];
1405
1405
  _c = {};
1406
- return [4, parseBody(output.body, context)];
1406
+ return [4, parseErrorBody(output.body, context)];
1407
1407
  case 1:
1408
1408
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1409
1409
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1470,7 +1470,7 @@ var deserializeAws_restJson1DescribeJobLogItemsCommandError = function (output,
1470
1470
  case 0:
1471
1471
  _a = [__assign({}, output)];
1472
1472
  _c = {};
1473
- return [4, parseBody(output.body, context)];
1473
+ return [4, parseErrorBody(output.body, context)];
1474
1474
  case 1:
1475
1475
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1476
1476
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1533,7 +1533,7 @@ var deserializeAws_restJson1DescribeJobsCommandError = function (output, context
1533
1533
  case 0:
1534
1534
  _a = [__assign({}, output)];
1535
1535
  _c = {};
1536
- return [4, parseBody(output.body, context)];
1536
+ return [4, parseErrorBody(output.body, context)];
1537
1537
  case 1:
1538
1538
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1539
1539
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1596,7 +1596,7 @@ var deserializeAws_restJson1DescribeLaunchConfigurationTemplatesCommandError = f
1596
1596
  case 0:
1597
1597
  _a = [__assign({}, output)];
1598
1598
  _c = {};
1599
- return [4, parseBody(output.body, context)];
1599
+ return [4, parseErrorBody(output.body, context)];
1600
1600
  case 1:
1601
1601
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1602
1602
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1663,7 +1663,7 @@ var deserializeAws_restJson1DescribeReplicationConfigurationTemplatesCommandErro
1663
1663
  case 0:
1664
1664
  _a = [__assign({}, output)];
1665
1665
  _c = {};
1666
- return [4, parseBody(output.body, context)];
1666
+ return [4, parseErrorBody(output.body, context)];
1667
1667
  case 1:
1668
1668
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1669
1669
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1730,7 +1730,7 @@ var deserializeAws_restJson1DescribeSourceServersCommandError = function (output
1730
1730
  case 0:
1731
1731
  _a = [__assign({}, output)];
1732
1732
  _c = {};
1733
- return [4, parseBody(output.body, context)];
1733
+ return [4, parseErrorBody(output.body, context)];
1734
1734
  case 1:
1735
1735
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1736
1736
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1793,7 +1793,7 @@ var deserializeAws_restJson1DescribeVcenterClientsCommandError = function (outpu
1793
1793
  case 0:
1794
1794
  _a = [__assign({}, output)];
1795
1795
  _c = {};
1796
- return [4, parseBody(output.body, context)];
1796
+ return [4, parseErrorBody(output.body, context)];
1797
1797
  case 1:
1798
1798
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1799
1799
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1884,7 +1884,7 @@ var deserializeAws_restJson1DisconnectFromServiceCommandError = function (output
1884
1884
  case 0:
1885
1885
  _a = [__assign({}, output)];
1886
1886
  _c = {};
1887
- return [4, parseBody(output.body, context)];
1887
+ return [4, parseErrorBody(output.body, context)];
1888
1888
  case 1:
1889
1889
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1890
1890
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1975,7 +1975,7 @@ var deserializeAws_restJson1FinalizeCutoverCommandError = function (output, cont
1975
1975
  case 0:
1976
1976
  _a = [__assign({}, output)];
1977
1977
  _c = {};
1978
- return [4, parseBody(output.body, context)];
1978
+ return [4, parseErrorBody(output.body, context)];
1979
1979
  case 1:
1980
1980
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1981
1981
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2070,7 +2070,7 @@ var deserializeAws_restJson1GetLaunchConfigurationCommandError = function (outpu
2070
2070
  case 0:
2071
2071
  _a = [__assign({}, output)];
2072
2072
  _c = {};
2073
- return [4, parseBody(output.body, context)];
2073
+ return [4, parseErrorBody(output.body, context)];
2074
2074
  case 1:
2075
2075
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2076
2076
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2172,7 +2172,7 @@ var deserializeAws_restJson1GetReplicationConfigurationCommandError = function (
2172
2172
  case 0:
2173
2173
  _a = [__assign({}, output)];
2174
2174
  _c = {};
2175
- return [4, parseBody(output.body, context)];
2175
+ return [4, parseErrorBody(output.body, context)];
2176
2176
  case 1:
2177
2177
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2178
2178
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2227,7 +2227,7 @@ var deserializeAws_restJson1InitializeServiceCommandError = function (output, co
2227
2227
  case 0:
2228
2228
  _a = [__assign({}, output)];
2229
2229
  _c = {};
2230
- return [4, parseBody(output.body, context)];
2230
+ return [4, parseErrorBody(output.body, context)];
2231
2231
  case 1:
2232
2232
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2233
2233
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2287,7 +2287,7 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
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);
@@ -2386,7 +2386,7 @@ var deserializeAws_restJson1MarkAsArchivedCommandError = function (output, conte
2386
2386
  case 0:
2387
2387
  _a = [__assign({}, output)];
2388
2388
  _c = {};
2389
- return [4, parseBody(output.body, context)];
2389
+ return [4, parseErrorBody(output.body, context)];
2390
2390
  case 1:
2391
2391
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2392
2392
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2477,7 +2477,7 @@ var deserializeAws_restJson1RetryDataReplicationCommandError = function (output,
2477
2477
  case 0:
2478
2478
  _a = [__assign({}, output)];
2479
2479
  _c = {};
2480
- return [4, parseBody(output.body, context)];
2480
+ return [4, parseErrorBody(output.body, context)];
2481
2481
  case 1:
2482
2482
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2483
2483
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2541,7 +2541,7 @@ var deserializeAws_restJson1StartCutoverCommandError = function (output, context
2541
2541
  case 0:
2542
2542
  _a = [__assign({}, output)];
2543
2543
  _c = {};
2544
- return [4, parseBody(output.body, context)];
2544
+ return [4, parseErrorBody(output.body, context)];
2545
2545
  case 1:
2546
2546
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2547
2547
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2632,7 +2632,7 @@ var deserializeAws_restJson1StartReplicationCommandError = function (output, con
2632
2632
  case 0:
2633
2633
  _a = [__assign({}, output)];
2634
2634
  _c = {};
2635
- return [4, parseBody(output.body, context)];
2635
+ return [4, parseErrorBody(output.body, context)];
2636
2636
  case 1:
2637
2637
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2638
2638
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2704,7 +2704,7 @@ var deserializeAws_restJson1StartTestCommandError = function (output, context) {
2704
2704
  case 0:
2705
2705
  _a = [__assign({}, output)];
2706
2706
  _c = {};
2707
- return [4, parseBody(output.body, context)];
2707
+ return [4, parseErrorBody(output.body, context)];
2708
2708
  case 1:
2709
2709
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2710
2710
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2763,7 +2763,7 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
2763
2763
  case 0:
2764
2764
  _a = [__assign({}, output)];
2765
2765
  _c = {};
2766
- return [4, parseBody(output.body, context)];
2766
+ return [4, parseErrorBody(output.body, context)];
2767
2767
  case 1:
2768
2768
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2769
2769
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2835,7 +2835,7 @@ var deserializeAws_restJson1TerminateTargetInstancesCommandError = function (out
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);
@@ -2894,7 +2894,7 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
2894
2894
  case 0:
2895
2895
  _a = [__assign({}, output)];
2896
2896
  _c = {};
2897
- return [4, parseBody(output.body, context)];
2897
+ return [4, parseErrorBody(output.body, context)];
2898
2898
  case 1:
2899
2899
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2900
2900
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2993,7 +2993,7 @@ var deserializeAws_restJson1UpdateLaunchConfigurationCommandError = function (ou
2993
2993
  case 0:
2994
2994
  _a = [__assign({}, output)];
2995
2995
  _c = {};
2996
- return [4, parseBody(output.body, context)];
2996
+ return [4, parseErrorBody(output.body, context)];
2997
2997
  case 1:
2998
2998
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2999
2999
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3070,7 +3070,7 @@ var deserializeAws_restJson1UpdateLaunchConfigurationTemplateCommandError = func
3070
3070
  case 0:
3071
3071
  _a = [__assign({}, output)];
3072
3072
  _c = {};
3073
- return [4, parseBody(output.body, context)];
3073
+ return [4, parseErrorBody(output.body, context)];
3074
3074
  case 1:
3075
3075
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3076
3076
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3180,7 +3180,7 @@ var deserializeAws_restJson1UpdateReplicationConfigurationCommandError = functio
3180
3180
  case 0:
3181
3181
  _a = [__assign({}, output)];
3182
3182
  _c = {};
3183
- return [4, parseBody(output.body, context)];
3183
+ return [4, parseErrorBody(output.body, context)];
3184
3184
  case 1:
3185
3185
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3186
3186
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3294,7 +3294,7 @@ var deserializeAws_restJson1UpdateReplicationConfigurationTemplateCommandError =
3294
3294
  case 0:
3295
3295
  _a = [__assign({}, output)];
3296
3296
  _c = {};
3297
- return [4, parseBody(output.body, context)];
3297
+ return [4, parseErrorBody(output.body, context)];
3298
3298
  case 1:
3299
3299
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3300
3300
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3389,7 +3389,7 @@ var deserializeAws_restJson1UpdateSourceServerReplicationTypeCommandError = func
3389
3389
  case 0:
3390
3390
  _a = [__assign({}, output)];
3391
3391
  _c = {};
3392
- return [4, parseBody(output.body, context)];
3392
+ return [4, parseErrorBody(output.body, context)];
3393
3393
  case 1:
3394
3394
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3395
3395
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4353,6 +4353,19 @@ var parseBody = function (streamBody, context) {
4353
4353
  return {};
4354
4354
  });
4355
4355
  };
4356
+ var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
4357
+ var value;
4358
+ var _a;
4359
+ return __generator(this, function (_b) {
4360
+ switch (_b.label) {
4361
+ case 0: return [4, parseBody(errorBody, context)];
4362
+ case 1:
4363
+ value = _b.sent();
4364
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
4365
+ return [2, value];
4366
+ }
4367
+ });
4368
+ }); };
4356
4369
  var loadRestJsonErrorCode = function (output, data) {
4357
4370
  var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
4358
4371
  var sanitizeErrorCode = function (rawValue) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-mgn",
3
3
  "description": "AWS SDK for JavaScript Mgn 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",