@aws-sdk/client-m2 3.179.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,26 @@
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
+
18
+ # [3.180.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.179.0...v3.180.0) (2022-09-27)
19
+
20
+ **Note:** Version bump only for package @aws-sdk/client-m2
21
+
22
+
23
+
24
+
25
+
6
26
  # [3.179.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.178.0...v3.179.0) (2022-09-26)
7
27
 
8
28
  **Note:** Version bump only for package @aws-sdk/client-m2
@@ -738,7 +738,7 @@ exports.deserializeAws_restJson1CancelBatchJobExecutionCommand = deserializeAws_
738
738
  const deserializeAws_restJson1CancelBatchJobExecutionCommandError = async (output, context) => {
739
739
  const parsedOutput = {
740
740
  ...output,
741
- body: await parseBody(output.body, context),
741
+ body: await parseErrorBody(output.body, context),
742
742
  };
743
743
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
744
744
  switch (errorCode) {
@@ -793,7 +793,7 @@ exports.deserializeAws_restJson1CreateApplicationCommand = deserializeAws_restJs
793
793
  const deserializeAws_restJson1CreateApplicationCommandError = async (output, context) => {
794
794
  const parsedOutput = {
795
795
  ...output,
796
- body: await parseBody(output.body, context),
796
+ body: await parseErrorBody(output.body, context),
797
797
  };
798
798
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
799
799
  switch (errorCode) {
@@ -842,7 +842,7 @@ exports.deserializeAws_restJson1CreateDataSetImportTaskCommand = deserializeAws_
842
842
  const deserializeAws_restJson1CreateDataSetImportTaskCommandError = async (output, context) => {
843
843
  const parsedOutput = {
844
844
  ...output,
845
- body: await parseBody(output.body, context),
845
+ body: await parseErrorBody(output.body, context),
846
846
  };
847
847
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
848
848
  switch (errorCode) {
@@ -894,7 +894,7 @@ exports.deserializeAws_restJson1CreateDeploymentCommand = deserializeAws_restJso
894
894
  const deserializeAws_restJson1CreateDeploymentCommandError = async (output, context) => {
895
895
  const parsedOutput = {
896
896
  ...output,
897
- body: await parseBody(output.body, context),
897
+ body: await parseErrorBody(output.body, context),
898
898
  };
899
899
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
900
900
  switch (errorCode) {
@@ -946,7 +946,7 @@ exports.deserializeAws_restJson1CreateEnvironmentCommand = deserializeAws_restJs
946
946
  const deserializeAws_restJson1CreateEnvironmentCommandError = async (output, context) => {
947
947
  const parsedOutput = {
948
948
  ...output,
949
- body: await parseBody(output.body, context),
949
+ body: await parseErrorBody(output.body, context),
950
950
  };
951
951
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
952
952
  switch (errorCode) {
@@ -992,7 +992,7 @@ exports.deserializeAws_restJson1DeleteApplicationCommand = deserializeAws_restJs
992
992
  const deserializeAws_restJson1DeleteApplicationCommandError = async (output, context) => {
993
993
  const parsedOutput = {
994
994
  ...output,
995
- body: await parseBody(output.body, context),
995
+ body: await parseErrorBody(output.body, context),
996
996
  };
997
997
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
998
998
  switch (errorCode) {
@@ -1035,7 +1035,7 @@ exports.deserializeAws_restJson1DeleteApplicationFromEnvironmentCommand = deseri
1035
1035
  const deserializeAws_restJson1DeleteApplicationFromEnvironmentCommandError = async (output, context) => {
1036
1036
  const parsedOutput = {
1037
1037
  ...output,
1038
- body: await parseBody(output.body, context),
1038
+ body: await parseErrorBody(output.body, context),
1039
1039
  };
1040
1040
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1041
1041
  switch (errorCode) {
@@ -1081,7 +1081,7 @@ exports.deserializeAws_restJson1DeleteEnvironmentCommand = deserializeAws_restJs
1081
1081
  const deserializeAws_restJson1DeleteEnvironmentCommandError = async (output, context) => {
1082
1082
  const parsedOutput = {
1083
1083
  ...output,
1084
- body: await parseBody(output.body, context),
1084
+ body: await parseErrorBody(output.body, context),
1085
1085
  };
1086
1086
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1087
1087
  switch (errorCode) {
@@ -1178,7 +1178,7 @@ exports.deserializeAws_restJson1GetApplicationCommand = deserializeAws_restJson1
1178
1178
  const deserializeAws_restJson1GetApplicationCommandError = async (output, context) => {
1179
1179
  const parsedOutput = {
1180
1180
  ...output,
1181
- body: await parseBody(output.body, context),
1181
+ body: await parseErrorBody(output.body, context),
1182
1182
  };
1183
1183
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1184
1184
  switch (errorCode) {
@@ -1242,7 +1242,7 @@ exports.deserializeAws_restJson1GetApplicationVersionCommand = deserializeAws_re
1242
1242
  const deserializeAws_restJson1GetApplicationVersionCommandError = async (output, context) => {
1243
1243
  const parsedOutput = {
1244
1244
  ...output,
1245
- body: await parseBody(output.body, context),
1245
+ body: await parseErrorBody(output.body, context),
1246
1246
  };
1247
1247
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1248
1248
  switch (errorCode) {
@@ -1315,7 +1315,7 @@ exports.deserializeAws_restJson1GetBatchJobExecutionCommand = deserializeAws_res
1315
1315
  const deserializeAws_restJson1GetBatchJobExecutionCommandError = 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) {
@@ -1382,7 +1382,7 @@ exports.deserializeAws_restJson1GetDataSetDetailsCommand = deserializeAws_restJs
1382
1382
  const deserializeAws_restJson1GetDataSetDetailsCommandError = async (output, context) => {
1383
1383
  const parsedOutput = {
1384
1384
  ...output,
1385
- body: await parseBody(output.body, context),
1385
+ body: await parseErrorBody(output.body, context),
1386
1386
  };
1387
1387
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1388
1388
  switch (errorCode) {
@@ -1434,7 +1434,7 @@ exports.deserializeAws_restJson1GetDataSetImportTaskCommand = deserializeAws_res
1434
1434
  const deserializeAws_restJson1GetDataSetImportTaskCommandError = async (output, context) => {
1435
1435
  const parsedOutput = {
1436
1436
  ...output,
1437
- body: await parseBody(output.body, context),
1437
+ body: await parseErrorBody(output.body, context),
1438
1438
  };
1439
1439
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1440
1440
  switch (errorCode) {
@@ -1498,7 +1498,7 @@ exports.deserializeAws_restJson1GetDeploymentCommand = deserializeAws_restJson1G
1498
1498
  const deserializeAws_restJson1GetDeploymentCommandError = async (output, context) => {
1499
1499
  const parsedOutput = {
1500
1500
  ...output,
1501
- body: await parseBody(output.body, context),
1501
+ body: await parseErrorBody(output.body, context),
1502
1502
  };
1503
1503
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1504
1504
  switch (errorCode) {
@@ -1604,7 +1604,7 @@ exports.deserializeAws_restJson1GetEnvironmentCommand = deserializeAws_restJson1
1604
1604
  const deserializeAws_restJson1GetEnvironmentCommandError = async (output, context) => {
1605
1605
  const parsedOutput = {
1606
1606
  ...output,
1607
- body: await parseBody(output.body, context),
1607
+ body: await parseErrorBody(output.body, context),
1608
1608
  };
1609
1609
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1610
1610
  switch (errorCode) {
@@ -1653,7 +1653,7 @@ exports.deserializeAws_restJson1ListApplicationsCommand = deserializeAws_restJso
1653
1653
  const deserializeAws_restJson1ListApplicationsCommandError = async (output, context) => {
1654
1654
  const parsedOutput = {
1655
1655
  ...output,
1656
- body: await parseBody(output.body, context),
1656
+ body: await parseErrorBody(output.body, context),
1657
1657
  };
1658
1658
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1659
1659
  switch (errorCode) {
@@ -1699,7 +1699,7 @@ exports.deserializeAws_restJson1ListApplicationVersionsCommand = deserializeAws_
1699
1699
  const deserializeAws_restJson1ListApplicationVersionsCommandError = async (output, context) => {
1700
1700
  const parsedOutput = {
1701
1701
  ...output,
1702
- body: await parseBody(output.body, context),
1702
+ body: await parseErrorBody(output.body, context),
1703
1703
  };
1704
1704
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1705
1705
  switch (errorCode) {
@@ -1748,7 +1748,7 @@ exports.deserializeAws_restJson1ListBatchJobDefinitionsCommand = deserializeAws_
1748
1748
  const deserializeAws_restJson1ListBatchJobDefinitionsCommandError = async (output, context) => {
1749
1749
  const parsedOutput = {
1750
1750
  ...output,
1751
- body: await parseBody(output.body, context),
1751
+ body: await parseErrorBody(output.body, context),
1752
1752
  };
1753
1753
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1754
1754
  switch (errorCode) {
@@ -1797,7 +1797,7 @@ exports.deserializeAws_restJson1ListBatchJobExecutionsCommand = deserializeAws_r
1797
1797
  const deserializeAws_restJson1ListBatchJobExecutionsCommandError = async (output, context) => {
1798
1798
  const parsedOutput = {
1799
1799
  ...output,
1800
- body: await parseBody(output.body, context),
1800
+ body: await parseErrorBody(output.body, context),
1801
1801
  };
1802
1802
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1803
1803
  switch (errorCode) {
@@ -1846,7 +1846,7 @@ exports.deserializeAws_restJson1ListDataSetImportHistoryCommand = deserializeAws
1846
1846
  const deserializeAws_restJson1ListDataSetImportHistoryCommandError = async (output, context) => {
1847
1847
  const parsedOutput = {
1848
1848
  ...output,
1849
- body: await parseBody(output.body, context),
1849
+ body: await parseErrorBody(output.body, context),
1850
1850
  };
1851
1851
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1852
1852
  switch (errorCode) {
@@ -1895,7 +1895,7 @@ exports.deserializeAws_restJson1ListDataSetsCommand = deserializeAws_restJson1Li
1895
1895
  const deserializeAws_restJson1ListDataSetsCommandError = async (output, context) => {
1896
1896
  const parsedOutput = {
1897
1897
  ...output,
1898
- body: await parseBody(output.body, context),
1898
+ body: await parseErrorBody(output.body, context),
1899
1899
  };
1900
1900
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1901
1901
  switch (errorCode) {
@@ -1944,7 +1944,7 @@ exports.deserializeAws_restJson1ListDeploymentsCommand = deserializeAws_restJson
1944
1944
  const deserializeAws_restJson1ListDeploymentsCommandError = async (output, context) => {
1945
1945
  const parsedOutput = {
1946
1946
  ...output,
1947
- body: await parseBody(output.body, context),
1947
+ body: await parseErrorBody(output.body, context),
1948
1948
  };
1949
1949
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1950
1950
  switch (errorCode) {
@@ -1993,7 +1993,7 @@ exports.deserializeAws_restJson1ListEngineVersionsCommand = deserializeAws_restJ
1993
1993
  const deserializeAws_restJson1ListEngineVersionsCommandError = async (output, context) => {
1994
1994
  const parsedOutput = {
1995
1995
  ...output,
1996
- body: await parseBody(output.body, context),
1996
+ body: await parseErrorBody(output.body, context),
1997
1997
  };
1998
1998
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1999
1999
  switch (errorCode) {
@@ -2039,7 +2039,7 @@ exports.deserializeAws_restJson1ListEnvironmentsCommand = deserializeAws_restJso
2039
2039
  const deserializeAws_restJson1ListEnvironmentsCommandError = async (output, context) => {
2040
2040
  const parsedOutput = {
2041
2041
  ...output,
2042
- body: await parseBody(output.body, context),
2042
+ body: await parseErrorBody(output.body, context),
2043
2043
  };
2044
2044
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2045
2045
  switch (errorCode) {
@@ -2082,7 +2082,7 @@ exports.deserializeAws_restJson1ListTagsForResourceCommand = deserializeAws_rest
2082
2082
  const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
2083
2083
  const parsedOutput = {
2084
2084
  ...output,
2085
- body: await parseBody(output.body, context),
2085
+ body: await parseErrorBody(output.body, context),
2086
2086
  };
2087
2087
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2088
2088
  switch (errorCode) {
@@ -2125,7 +2125,7 @@ exports.deserializeAws_restJson1StartApplicationCommand = deserializeAws_restJso
2125
2125
  const deserializeAws_restJson1StartApplicationCommandError = async (output, context) => {
2126
2126
  const parsedOutput = {
2127
2127
  ...output,
2128
- body: await parseBody(output.body, context),
2128
+ body: await parseErrorBody(output.body, context),
2129
2129
  };
2130
2130
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2131
2131
  switch (errorCode) {
@@ -2174,7 +2174,7 @@ exports.deserializeAws_restJson1StartBatchJobCommand = deserializeAws_restJson1S
2174
2174
  const deserializeAws_restJson1StartBatchJobCommandError = async (output, context) => {
2175
2175
  const parsedOutput = {
2176
2176
  ...output,
2177
- body: await parseBody(output.body, context),
2177
+ body: await parseErrorBody(output.body, context),
2178
2178
  };
2179
2179
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2180
2180
  switch (errorCode) {
@@ -2220,7 +2220,7 @@ exports.deserializeAws_restJson1StopApplicationCommand = deserializeAws_restJson
2220
2220
  const deserializeAws_restJson1StopApplicationCommandError = async (output, context) => {
2221
2221
  const parsedOutput = {
2222
2222
  ...output,
2223
- body: await parseBody(output.body, context),
2223
+ body: await parseErrorBody(output.body, context),
2224
2224
  };
2225
2225
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2226
2226
  switch (errorCode) {
@@ -2266,7 +2266,7 @@ exports.deserializeAws_restJson1TagResourceCommand = deserializeAws_restJson1Tag
2266
2266
  const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
2267
2267
  const parsedOutput = {
2268
2268
  ...output,
2269
- body: await parseBody(output.body, context),
2269
+ body: await parseErrorBody(output.body, context),
2270
2270
  };
2271
2271
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2272
2272
  switch (errorCode) {
@@ -2312,7 +2312,7 @@ exports.deserializeAws_restJson1UntagResourceCommand = deserializeAws_restJson1U
2312
2312
  const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
2313
2313
  const parsedOutput = {
2314
2314
  ...output,
2315
- body: await parseBody(output.body, context),
2315
+ body: await parseErrorBody(output.body, context),
2316
2316
  };
2317
2317
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2318
2318
  switch (errorCode) {
@@ -2358,7 +2358,7 @@ exports.deserializeAws_restJson1UpdateApplicationCommand = deserializeAws_restJs
2358
2358
  const deserializeAws_restJson1UpdateApplicationCommandError = async (output, context) => {
2359
2359
  const parsedOutput = {
2360
2360
  ...output,
2361
- body: await parseBody(output.body, context),
2361
+ body: await parseErrorBody(output.body, context),
2362
2362
  };
2363
2363
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2364
2364
  switch (errorCode) {
@@ -2407,7 +2407,7 @@ exports.deserializeAws_restJson1UpdateEnvironmentCommand = deserializeAws_restJs
2407
2407
  const deserializeAws_restJson1UpdateEnvironmentCommandError = async (output, context) => {
2408
2408
  const parsedOutput = {
2409
2409
  ...output,
2410
- body: await parseBody(output.body, context),
2410
+ body: await parseErrorBody(output.body, context),
2411
2411
  };
2412
2412
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2413
2413
  switch (errorCode) {
@@ -3207,6 +3207,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
3207
3207
  }
3208
3208
  return {};
3209
3209
  });
3210
+ const parseErrorBody = async (errorBody, context) => {
3211
+ var _a;
3212
+ const value = await parseBody(errorBody, context);
3213
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
3214
+ return value;
3215
+ };
3210
3216
  const loadRestJsonErrorCode = (output, data) => {
3211
3217
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
3212
3218
  const sanitizeErrorCode = (rawValue) => {
@@ -862,7 +862,7 @@ var deserializeAws_restJson1CancelBatchJobExecutionCommandError = function (outp
862
862
  case 0:
863
863
  _a = [__assign({}, output)];
864
864
  _c = {};
865
- return [4, parseBody(output.body, context)];
865
+ return [4, parseErrorBody(output.body, context)];
866
866
  case 1:
867
867
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
868
868
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -944,7 +944,7 @@ var deserializeAws_restJson1CreateApplicationCommandError = function (output, co
944
944
  case 0:
945
945
  _a = [__assign({}, output)];
946
946
  _c = {};
947
- return [4, parseBody(output.body, context)];
947
+ return [4, parseErrorBody(output.body, context)];
948
948
  case 1:
949
949
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
950
950
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1020,7 +1020,7 @@ var deserializeAws_restJson1CreateDataSetImportTaskCommandError = function (outp
1020
1020
  case 0:
1021
1021
  _a = [__assign({}, output)];
1022
1022
  _c = {};
1023
- return [4, parseBody(output.body, context)];
1023
+ return [4, parseErrorBody(output.body, context)];
1024
1024
  case 1:
1025
1025
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1026
1026
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1100,7 +1100,7 @@ var deserializeAws_restJson1CreateDeploymentCommandError = function (output, con
1100
1100
  case 0:
1101
1101
  _a = [__assign({}, output)];
1102
1102
  _c = {};
1103
- return [4, parseBody(output.body, context)];
1103
+ return [4, parseErrorBody(output.body, context)];
1104
1104
  case 1:
1105
1105
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1106
1106
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1180,7 +1180,7 @@ var deserializeAws_restJson1CreateEnvironmentCommandError = function (output, co
1180
1180
  case 0:
1181
1181
  _a = [__assign({}, output)];
1182
1182
  _c = {};
1183
- return [4, parseBody(output.body, context)];
1183
+ return [4, parseErrorBody(output.body, context)];
1184
1184
  case 1:
1185
1185
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1186
1186
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1251,7 +1251,7 @@ var deserializeAws_restJson1DeleteApplicationCommandError = function (output, co
1251
1251
  case 0:
1252
1252
  _a = [__assign({}, output)];
1253
1253
  _c = {};
1254
- return [4, parseBody(output.body, context)];
1254
+ return [4, parseErrorBody(output.body, context)];
1255
1255
  case 1:
1256
1256
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1257
1257
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1318,7 +1318,7 @@ var deserializeAws_restJson1DeleteApplicationFromEnvironmentCommandError = funct
1318
1318
  case 0:
1319
1319
  _a = [__assign({}, output)];
1320
1320
  _c = {};
1321
- return [4, parseBody(output.body, context)];
1321
+ return [4, parseErrorBody(output.body, context)];
1322
1322
  case 1:
1323
1323
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1324
1324
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1389,7 +1389,7 @@ var deserializeAws_restJson1DeleteEnvironmentCommandError = function (output, co
1389
1389
  case 0:
1390
1390
  _a = [__assign({}, output)];
1391
1391
  _c = {};
1392
- return [4, parseBody(output.body, context)];
1392
+ return [4, parseErrorBody(output.body, context)];
1393
1393
  case 1:
1394
1394
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1395
1395
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1512,7 +1512,7 @@ var deserializeAws_restJson1GetApplicationCommandError = function (output, conte
1512
1512
  case 0:
1513
1513
  _a = [__assign({}, output)];
1514
1514
  _c = {};
1515
- return [4, parseBody(output.body, context)];
1515
+ return [4, parseErrorBody(output.body, context)];
1516
1516
  case 1:
1517
1517
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1518
1518
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1602,7 +1602,7 @@ var deserializeAws_restJson1GetApplicationVersionCommandError = function (output
1602
1602
  case 0:
1603
1603
  _a = [__assign({}, output)];
1604
1604
  _c = {};
1605
- return [4, parseBody(output.body, context)];
1605
+ return [4, parseErrorBody(output.body, context)];
1606
1606
  case 1:
1607
1607
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1608
1608
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1701,7 +1701,7 @@ var deserializeAws_restJson1GetBatchJobExecutionCommandError = function (output,
1701
1701
  case 0:
1702
1702
  _a = [__assign({}, output)];
1703
1703
  _c = {};
1704
- return [4, parseBody(output.body, context)];
1704
+ return [4, parseErrorBody(output.body, context)];
1705
1705
  case 1:
1706
1706
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1707
1707
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1794,7 +1794,7 @@ var deserializeAws_restJson1GetDataSetDetailsCommandError = function (output, co
1794
1794
  case 0:
1795
1795
  _a = [__assign({}, output)];
1796
1796
  _c = {};
1797
- return [4, parseBody(output.body, context)];
1797
+ return [4, parseErrorBody(output.body, context)];
1798
1798
  case 1:
1799
1799
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1800
1800
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1872,7 +1872,7 @@ var deserializeAws_restJson1GetDataSetImportTaskCommandError = function (output,
1872
1872
  case 0:
1873
1873
  _a = [__assign({}, output)];
1874
1874
  _c = {};
1875
- return [4, parseBody(output.body, context)];
1875
+ return [4, parseErrorBody(output.body, context)];
1876
1876
  case 1:
1877
1877
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1878
1878
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1962,7 +1962,7 @@ var deserializeAws_restJson1GetDeploymentCommandError = function (output, contex
1962
1962
  case 0:
1963
1963
  _a = [__assign({}, output)];
1964
1964
  _c = {};
1965
- return [4, parseBody(output.body, context)];
1965
+ return [4, parseErrorBody(output.body, context)];
1966
1966
  case 1:
1967
1967
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1968
1968
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2094,7 +2094,7 @@ var deserializeAws_restJson1GetEnvironmentCommandError = function (output, conte
2094
2094
  case 0:
2095
2095
  _a = [__assign({}, output)];
2096
2096
  _c = {};
2097
- return [4, parseBody(output.body, context)];
2097
+ return [4, parseErrorBody(output.body, context)];
2098
2098
  case 1:
2099
2099
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2100
2100
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2169,7 +2169,7 @@ var deserializeAws_restJson1ListApplicationsCommandError = function (output, con
2169
2169
  case 0:
2170
2170
  _a = [__assign({}, output)];
2171
2171
  _c = {};
2172
- return [4, parseBody(output.body, context)];
2172
+ return [4, parseErrorBody(output.body, context)];
2173
2173
  case 1:
2174
2174
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2175
2175
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2240,7 +2240,7 @@ var deserializeAws_restJson1ListApplicationVersionsCommandError = function (outp
2240
2240
  case 0:
2241
2241
  _a = [__assign({}, output)];
2242
2242
  _c = {};
2243
- return [4, parseBody(output.body, context)];
2243
+ return [4, parseErrorBody(output.body, context)];
2244
2244
  case 1:
2245
2245
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2246
2246
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2315,7 +2315,7 @@ var deserializeAws_restJson1ListBatchJobDefinitionsCommandError = function (outp
2315
2315
  case 0:
2316
2316
  _a = [__assign({}, output)];
2317
2317
  _c = {};
2318
- return [4, parseBody(output.body, context)];
2318
+ return [4, parseErrorBody(output.body, context)];
2319
2319
  case 1:
2320
2320
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2321
2321
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2390,7 +2390,7 @@ var deserializeAws_restJson1ListBatchJobExecutionsCommandError = function (outpu
2390
2390
  case 0:
2391
2391
  _a = [__assign({}, output)];
2392
2392
  _c = {};
2393
- return [4, parseBody(output.body, context)];
2393
+ return [4, parseErrorBody(output.body, context)];
2394
2394
  case 1:
2395
2395
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2396
2396
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2465,7 +2465,7 @@ var deserializeAws_restJson1ListDataSetImportHistoryCommandError = function (out
2465
2465
  case 0:
2466
2466
  _a = [__assign({}, output)];
2467
2467
  _c = {};
2468
- return [4, parseBody(output.body, context)];
2468
+ return [4, parseErrorBody(output.body, context)];
2469
2469
  case 1:
2470
2470
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2471
2471
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2540,7 +2540,7 @@ var deserializeAws_restJson1ListDataSetsCommandError = function (output, context
2540
2540
  case 0:
2541
2541
  _a = [__assign({}, output)];
2542
2542
  _c = {};
2543
- return [4, parseBody(output.body, context)];
2543
+ return [4, parseErrorBody(output.body, context)];
2544
2544
  case 1:
2545
2545
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2546
2546
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2615,7 +2615,7 @@ var deserializeAws_restJson1ListDeploymentsCommandError = function (output, cont
2615
2615
  case 0:
2616
2616
  _a = [__assign({}, output)];
2617
2617
  _c = {};
2618
- return [4, parseBody(output.body, context)];
2618
+ return [4, parseErrorBody(output.body, context)];
2619
2619
  case 1:
2620
2620
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2621
2621
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2690,7 +2690,7 @@ var deserializeAws_restJson1ListEngineVersionsCommandError = function (output, c
2690
2690
  case 0:
2691
2691
  _a = [__assign({}, output)];
2692
2692
  _c = {};
2693
- return [4, parseBody(output.body, context)];
2693
+ return [4, parseErrorBody(output.body, context)];
2694
2694
  case 1:
2695
2695
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2696
2696
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2761,7 +2761,7 @@ var deserializeAws_restJson1ListEnvironmentsCommandError = function (output, con
2761
2761
  case 0:
2762
2762
  _a = [__assign({}, output)];
2763
2763
  _c = {};
2764
- return [4, parseBody(output.body, context)];
2764
+ return [4, parseErrorBody(output.body, context)];
2765
2765
  case 1:
2766
2766
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2767
2767
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2829,7 +2829,7 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
2829
2829
  case 0:
2830
2830
  _a = [__assign({}, output)];
2831
2831
  _c = {};
2832
- return [4, parseBody(output.body, context)];
2832
+ return [4, parseErrorBody(output.body, context)];
2833
2833
  case 1:
2834
2834
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2835
2835
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2896,7 +2896,7 @@ var deserializeAws_restJson1StartApplicationCommandError = function (output, con
2896
2896
  case 0:
2897
2897
  _a = [__assign({}, output)];
2898
2898
  _c = {};
2899
- return [4, parseBody(output.body, context)];
2899
+ return [4, parseErrorBody(output.body, context)];
2900
2900
  case 1:
2901
2901
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2902
2902
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2972,7 +2972,7 @@ var deserializeAws_restJson1StartBatchJobCommandError = function (output, contex
2972
2972
  case 0:
2973
2973
  _a = [__assign({}, output)];
2974
2974
  _c = {};
2975
- return [4, parseBody(output.body, context)];
2975
+ return [4, parseErrorBody(output.body, context)];
2976
2976
  case 1:
2977
2977
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2978
2978
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3043,7 +3043,7 @@ var deserializeAws_restJson1StopApplicationCommandError = function (output, cont
3043
3043
  case 0:
3044
3044
  _a = [__assign({}, output)];
3045
3045
  _c = {};
3046
- return [4, parseBody(output.body, context)];
3046
+ return [4, parseErrorBody(output.body, context)];
3047
3047
  case 1:
3048
3048
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3049
3049
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3114,7 +3114,7 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
3114
3114
  case 0:
3115
3115
  _a = [__assign({}, output)];
3116
3116
  _c = {};
3117
- return [4, parseBody(output.body, context)];
3117
+ return [4, parseErrorBody(output.body, context)];
3118
3118
  case 1:
3119
3119
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3120
3120
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3185,7 +3185,7 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
3185
3185
  case 0:
3186
3186
  _a = [__assign({}, output)];
3187
3187
  _c = {};
3188
- return [4, parseBody(output.body, context)];
3188
+ return [4, parseErrorBody(output.body, context)];
3189
3189
  case 1:
3190
3190
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3191
3191
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3257,7 +3257,7 @@ var deserializeAws_restJson1UpdateApplicationCommandError = function (output, co
3257
3257
  case 0:
3258
3258
  _a = [__assign({}, output)];
3259
3259
  _c = {};
3260
- return [4, parseBody(output.body, context)];
3260
+ return [4, parseErrorBody(output.body, context)];
3261
3261
  case 1:
3262
3262
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3263
3263
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3333,7 +3333,7 @@ var deserializeAws_restJson1UpdateEnvironmentCommandError = function (output, co
3333
3333
  case 0:
3334
3334
  _a = [__assign({}, output)];
3335
3335
  _c = {};
3336
- return [4, parseBody(output.body, context)];
3336
+ return [4, parseErrorBody(output.body, context)];
3337
3337
  case 1:
3338
3338
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3339
3339
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4108,6 +4108,19 @@ var parseBody = function (streamBody, context) {
4108
4108
  return {};
4109
4109
  });
4110
4110
  };
4111
+ var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
4112
+ var value;
4113
+ var _a;
4114
+ return __generator(this, function (_b) {
4115
+ switch (_b.label) {
4116
+ case 0: return [4, parseBody(errorBody, context)];
4117
+ case 1:
4118
+ value = _b.sent();
4119
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
4120
+ return [2, value];
4121
+ }
4122
+ });
4123
+ }); };
4111
4124
  var loadRestJsonErrorCode = function (output, data) {
4112
4125
  var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
4113
4126
  var sanitizeErrorCode = function (rawValue) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-m2",
3
3
  "description": "AWS SDK for JavaScript M2 Client for Node.js, Browser and React Native",
4
- "version": "3.179.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.179.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.178.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",
@@ -37,15 +37,15 @@
37
37
  "@aws-sdk/node-config-provider": "3.178.0",
38
38
  "@aws-sdk/node-http-handler": "3.178.0",
39
39
  "@aws-sdk/protocol-http": "3.178.0",
40
- "@aws-sdk/smithy-client": "3.178.0",
40
+ "@aws-sdk/smithy-client": "3.180.0",
41
41
  "@aws-sdk/types": "3.178.0",
42
42
  "@aws-sdk/url-parser": "3.178.0",
43
43
  "@aws-sdk/util-base64-browser": "3.170.0",
44
44
  "@aws-sdk/util-base64-node": "3.170.0",
45
45
  "@aws-sdk/util-body-length-browser": "3.170.0",
46
46
  "@aws-sdk/util-body-length-node": "3.170.0",
47
- "@aws-sdk/util-defaults-mode-browser": "3.178.0",
48
- "@aws-sdk/util-defaults-mode-node": "3.178.0",
47
+ "@aws-sdk/util-defaults-mode-browser": "3.180.0",
48
+ "@aws-sdk/util-defaults-mode-node": "3.180.0",
49
49
  "@aws-sdk/util-user-agent-browser": "3.178.0",
50
50
  "@aws-sdk/util-user-agent-node": "3.178.0",
51
51
  "@aws-sdk/util-utf8-browser": "3.170.0",