@aws-sdk/client-mediaconnect 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-mediaconnect
@@ -712,7 +712,7 @@ exports.deserializeAws_restJson1AddFlowMediaStreamsCommand = deserializeAws_rest
712
712
  const deserializeAws_restJson1AddFlowMediaStreamsCommandError = async (output, context) => {
713
713
  const parsedOutput = {
714
714
  ...output,
715
- body: await parseBody(output.body, context),
715
+ body: await parseErrorBody(output.body, context),
716
716
  };
717
717
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
718
718
  switch (errorCode) {
@@ -764,7 +764,7 @@ exports.deserializeAws_restJson1AddFlowOutputsCommand = deserializeAws_restJson1
764
764
  const deserializeAws_restJson1AddFlowOutputsCommandError = async (output, context) => {
765
765
  const parsedOutput = {
766
766
  ...output,
767
- body: await parseBody(output.body, context),
767
+ body: await parseErrorBody(output.body, context),
768
768
  };
769
769
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
770
770
  switch (errorCode) {
@@ -819,7 +819,7 @@ exports.deserializeAws_restJson1AddFlowSourcesCommand = deserializeAws_restJson1
819
819
  const deserializeAws_restJson1AddFlowSourcesCommandError = async (output, context) => {
820
820
  const parsedOutput = {
821
821
  ...output,
822
- body: await parseBody(output.body, context),
822
+ body: await parseErrorBody(output.body, context),
823
823
  };
824
824
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
825
825
  switch (errorCode) {
@@ -871,7 +871,7 @@ exports.deserializeAws_restJson1AddFlowVpcInterfacesCommand = deserializeAws_res
871
871
  const deserializeAws_restJson1AddFlowVpcInterfacesCommandError = 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) {
@@ -920,7 +920,7 @@ exports.deserializeAws_restJson1CreateFlowCommand = deserializeAws_restJson1Crea
920
920
  const deserializeAws_restJson1CreateFlowCommandError = async (output, context) => {
921
921
  const parsedOutput = {
922
922
  ...output,
923
- body: await parseBody(output.body, context),
923
+ body: await parseErrorBody(output.body, context),
924
924
  };
925
925
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
926
926
  switch (errorCode) {
@@ -972,7 +972,7 @@ exports.deserializeAws_restJson1DeleteFlowCommand = deserializeAws_restJson1Dele
972
972
  const deserializeAws_restJson1DeleteFlowCommandError = async (output, context) => {
973
973
  const parsedOutput = {
974
974
  ...output,
975
- body: await parseBody(output.body, context),
975
+ body: await parseErrorBody(output.body, context),
976
976
  };
977
977
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
978
978
  switch (errorCode) {
@@ -1024,7 +1024,7 @@ exports.deserializeAws_restJson1DescribeFlowCommand = deserializeAws_restJson1De
1024
1024
  const deserializeAws_restJson1DescribeFlowCommandError = async (output, context) => {
1025
1025
  const parsedOutput = {
1026
1026
  ...output,
1027
- body: await parseBody(output.body, context),
1027
+ body: await parseErrorBody(output.body, context),
1028
1028
  };
1029
1029
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1030
1030
  switch (errorCode) {
@@ -1073,7 +1073,7 @@ exports.deserializeAws_restJson1DescribeOfferingCommand = deserializeAws_restJso
1073
1073
  const deserializeAws_restJson1DescribeOfferingCommandError = async (output, context) => {
1074
1074
  const parsedOutput = {
1075
1075
  ...output,
1076
- body: await parseBody(output.body, context),
1076
+ body: await parseErrorBody(output.body, context),
1077
1077
  };
1078
1078
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1079
1079
  switch (errorCode) {
@@ -1119,7 +1119,7 @@ exports.deserializeAws_restJson1DescribeReservationCommand = deserializeAws_rest
1119
1119
  const deserializeAws_restJson1DescribeReservationCommandError = async (output, context) => {
1120
1120
  const parsedOutput = {
1121
1121
  ...output,
1122
- body: await parseBody(output.body, context),
1122
+ body: await parseErrorBody(output.body, context),
1123
1123
  };
1124
1124
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1125
1125
  switch (errorCode) {
@@ -1168,7 +1168,7 @@ exports.deserializeAws_restJson1GrantFlowEntitlementsCommand = deserializeAws_re
1168
1168
  const deserializeAws_restJson1GrantFlowEntitlementsCommandError = async (output, context) => {
1169
1169
  const parsedOutput = {
1170
1170
  ...output,
1171
- body: await parseBody(output.body, context),
1171
+ body: await parseErrorBody(output.body, context),
1172
1172
  };
1173
1173
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1174
1174
  switch (errorCode) {
@@ -1223,7 +1223,7 @@ exports.deserializeAws_restJson1ListEntitlementsCommand = deserializeAws_restJso
1223
1223
  const deserializeAws_restJson1ListEntitlementsCommandError = async (output, context) => {
1224
1224
  const parsedOutput = {
1225
1225
  ...output,
1226
- body: await parseBody(output.body, context),
1226
+ body: await parseErrorBody(output.body, context),
1227
1227
  };
1228
1228
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1229
1229
  switch (errorCode) {
@@ -1269,7 +1269,7 @@ exports.deserializeAws_restJson1ListFlowsCommand = deserializeAws_restJson1ListF
1269
1269
  const deserializeAws_restJson1ListFlowsCommandError = async (output, context) => {
1270
1270
  const parsedOutput = {
1271
1271
  ...output,
1272
- body: await parseBody(output.body, context),
1272
+ body: await parseErrorBody(output.body, context),
1273
1273
  };
1274
1274
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1275
1275
  switch (errorCode) {
@@ -1315,7 +1315,7 @@ exports.deserializeAws_restJson1ListOfferingsCommand = deserializeAws_restJson1L
1315
1315
  const deserializeAws_restJson1ListOfferingsCommandError = 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) {
@@ -1361,7 +1361,7 @@ exports.deserializeAws_restJson1ListReservationsCommand = deserializeAws_restJso
1361
1361
  const deserializeAws_restJson1ListReservationsCommandError = async (output, context) => {
1362
1362
  const parsedOutput = {
1363
1363
  ...output,
1364
- body: await parseBody(output.body, context),
1364
+ body: await parseErrorBody(output.body, context),
1365
1365
  };
1366
1366
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1367
1367
  switch (errorCode) {
@@ -1404,7 +1404,7 @@ exports.deserializeAws_restJson1ListTagsForResourceCommand = deserializeAws_rest
1404
1404
  const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
1405
1405
  const parsedOutput = {
1406
1406
  ...output,
1407
- body: await parseBody(output.body, context),
1407
+ body: await parseErrorBody(output.body, context),
1408
1408
  };
1409
1409
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1410
1410
  switch (errorCode) {
@@ -1444,7 +1444,7 @@ exports.deserializeAws_restJson1PurchaseOfferingCommand = deserializeAws_restJso
1444
1444
  const deserializeAws_restJson1PurchaseOfferingCommandError = 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) {
@@ -1496,7 +1496,7 @@ exports.deserializeAws_restJson1RemoveFlowMediaStreamCommand = deserializeAws_re
1496
1496
  const deserializeAws_restJson1RemoveFlowMediaStreamCommandError = async (output, context) => {
1497
1497
  const parsedOutput = {
1498
1498
  ...output,
1499
- body: await parseBody(output.body, context),
1499
+ body: await parseErrorBody(output.body, context),
1500
1500
  };
1501
1501
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1502
1502
  switch (errorCode) {
@@ -1548,7 +1548,7 @@ exports.deserializeAws_restJson1RemoveFlowOutputCommand = deserializeAws_restJso
1548
1548
  const deserializeAws_restJson1RemoveFlowOutputCommandError = async (output, context) => {
1549
1549
  const parsedOutput = {
1550
1550
  ...output,
1551
- body: await parseBody(output.body, context),
1551
+ body: await parseErrorBody(output.body, context),
1552
1552
  };
1553
1553
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1554
1554
  switch (errorCode) {
@@ -1600,7 +1600,7 @@ exports.deserializeAws_restJson1RemoveFlowSourceCommand = deserializeAws_restJso
1600
1600
  const deserializeAws_restJson1RemoveFlowSourceCommandError = async (output, context) => {
1601
1601
  const parsedOutput = {
1602
1602
  ...output,
1603
- body: await parseBody(output.body, context),
1603
+ body: await parseErrorBody(output.body, context),
1604
1604
  };
1605
1605
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1606
1606
  switch (errorCode) {
@@ -1655,7 +1655,7 @@ exports.deserializeAws_restJson1RemoveFlowVpcInterfaceCommand = deserializeAws_r
1655
1655
  const deserializeAws_restJson1RemoveFlowVpcInterfaceCommandError = async (output, context) => {
1656
1656
  const parsedOutput = {
1657
1657
  ...output,
1658
- body: await parseBody(output.body, context),
1658
+ body: await parseErrorBody(output.body, context),
1659
1659
  };
1660
1660
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1661
1661
  switch (errorCode) {
@@ -1707,7 +1707,7 @@ exports.deserializeAws_restJson1RevokeFlowEntitlementCommand = deserializeAws_re
1707
1707
  const deserializeAws_restJson1RevokeFlowEntitlementCommandError = async (output, context) => {
1708
1708
  const parsedOutput = {
1709
1709
  ...output,
1710
- body: await parseBody(output.body, context),
1710
+ body: await parseErrorBody(output.body, context),
1711
1711
  };
1712
1712
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1713
1713
  switch (errorCode) {
@@ -1759,7 +1759,7 @@ exports.deserializeAws_restJson1StartFlowCommand = deserializeAws_restJson1Start
1759
1759
  const deserializeAws_restJson1StartFlowCommandError = async (output, context) => {
1760
1760
  const parsedOutput = {
1761
1761
  ...output,
1762
- body: await parseBody(output.body, context),
1762
+ body: await parseErrorBody(output.body, context),
1763
1763
  };
1764
1764
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1765
1765
  switch (errorCode) {
@@ -1811,7 +1811,7 @@ exports.deserializeAws_restJson1StopFlowCommand = deserializeAws_restJson1StopFl
1811
1811
  const deserializeAws_restJson1StopFlowCommandError = async (output, context) => {
1812
1812
  const parsedOutput = {
1813
1813
  ...output,
1814
- body: await parseBody(output.body, context),
1814
+ body: await parseErrorBody(output.body, context),
1815
1815
  };
1816
1816
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1817
1817
  switch (errorCode) {
@@ -1857,7 +1857,7 @@ exports.deserializeAws_restJson1TagResourceCommand = deserializeAws_restJson1Tag
1857
1857
  const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
1858
1858
  const parsedOutput = {
1859
1859
  ...output,
1860
- body: await parseBody(output.body, context),
1860
+ body: await parseErrorBody(output.body, context),
1861
1861
  };
1862
1862
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1863
1863
  switch (errorCode) {
@@ -1894,7 +1894,7 @@ exports.deserializeAws_restJson1UntagResourceCommand = deserializeAws_restJson1U
1894
1894
  const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
1895
1895
  const parsedOutput = {
1896
1896
  ...output,
1897
- body: await parseBody(output.body, context),
1897
+ body: await parseErrorBody(output.body, context),
1898
1898
  };
1899
1899
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1900
1900
  switch (errorCode) {
@@ -1934,7 +1934,7 @@ exports.deserializeAws_restJson1UpdateFlowCommand = deserializeAws_restJson1Upda
1934
1934
  const deserializeAws_restJson1UpdateFlowCommandError = async (output, context) => {
1935
1935
  const parsedOutput = {
1936
1936
  ...output,
1937
- body: await parseBody(output.body, context),
1937
+ body: await parseErrorBody(output.body, context),
1938
1938
  };
1939
1939
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1940
1940
  switch (errorCode) {
@@ -1986,7 +1986,7 @@ exports.deserializeAws_restJson1UpdateFlowEntitlementCommand = deserializeAws_re
1986
1986
  const deserializeAws_restJson1UpdateFlowEntitlementCommandError = async (output, context) => {
1987
1987
  const parsedOutput = {
1988
1988
  ...output,
1989
- body: await parseBody(output.body, context),
1989
+ body: await parseErrorBody(output.body, context),
1990
1990
  };
1991
1991
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1992
1992
  switch (errorCode) {
@@ -2038,7 +2038,7 @@ exports.deserializeAws_restJson1UpdateFlowMediaStreamCommand = deserializeAws_re
2038
2038
  const deserializeAws_restJson1UpdateFlowMediaStreamCommandError = async (output, context) => {
2039
2039
  const parsedOutput = {
2040
2040
  ...output,
2041
- body: await parseBody(output.body, context),
2041
+ body: await parseErrorBody(output.body, context),
2042
2042
  };
2043
2043
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2044
2044
  switch (errorCode) {
@@ -2090,7 +2090,7 @@ exports.deserializeAws_restJson1UpdateFlowOutputCommand = deserializeAws_restJso
2090
2090
  const deserializeAws_restJson1UpdateFlowOutputCommandError = async (output, context) => {
2091
2091
  const parsedOutput = {
2092
2092
  ...output,
2093
- body: await parseBody(output.body, context),
2093
+ body: await parseErrorBody(output.body, context),
2094
2094
  };
2095
2095
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2096
2096
  switch (errorCode) {
@@ -2142,7 +2142,7 @@ exports.deserializeAws_restJson1UpdateFlowSourceCommand = deserializeAws_restJso
2142
2142
  const deserializeAws_restJson1UpdateFlowSourceCommandError = async (output, context) => {
2143
2143
  const parsedOutput = {
2144
2144
  ...output,
2145
- body: await parseBody(output.body, context),
2145
+ body: await parseErrorBody(output.body, context),
2146
2146
  };
2147
2147
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2148
2148
  switch (errorCode) {
@@ -3068,6 +3068,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
3068
3068
  }
3069
3069
  return {};
3070
3070
  });
3071
+ const parseErrorBody = async (errorBody, context) => {
3072
+ var _a;
3073
+ const value = await parseBody(errorBody, context);
3074
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
3075
+ return value;
3076
+ };
3071
3077
  const loadRestJsonErrorCode = (output, data) => {
3072
3078
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
3073
3079
  const sanitizeErrorCode = (rawValue) => {
@@ -799,7 +799,7 @@ var deserializeAws_restJson1AddFlowMediaStreamsCommandError = function (output,
799
799
  case 0:
800
800
  _a = [__assign({}, output)];
801
801
  _c = {};
802
- return [4, parseBody(output.body, context)];
802
+ return [4, parseErrorBody(output.body, context)];
803
803
  case 1:
804
804
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
805
805
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -878,7 +878,7 @@ var deserializeAws_restJson1AddFlowOutputsCommandError = function (output, conte
878
878
  case 0:
879
879
  _a = [__assign({}, output)];
880
880
  _c = {};
881
- return [4, parseBody(output.body, context)];
881
+ return [4, parseErrorBody(output.body, context)];
882
882
  case 1:
883
883
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
884
884
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -961,7 +961,7 @@ var deserializeAws_restJson1AddFlowSourcesCommandError = function (output, conte
961
961
  case 0:
962
962
  _a = [__assign({}, output)];
963
963
  _c = {};
964
- return [4, parseBody(output.body, context)];
964
+ return [4, parseErrorBody(output.body, context)];
965
965
  case 1:
966
966
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
967
967
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1040,7 +1040,7 @@ var deserializeAws_restJson1AddFlowVpcInterfacesCommandError = function (output,
1040
1040
  case 0:
1041
1041
  _a = [__assign({}, output)];
1042
1042
  _c = {};
1043
- return [4, parseBody(output.body, context)];
1043
+ return [4, parseErrorBody(output.body, context)];
1044
1044
  case 1:
1045
1045
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1046
1046
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1116,7 +1116,7 @@ var deserializeAws_restJson1CreateFlowCommandError = function (output, context)
1116
1116
  case 0:
1117
1117
  _a = [__assign({}, output)];
1118
1118
  _c = {};
1119
- return [4, parseBody(output.body, context)];
1119
+ return [4, parseErrorBody(output.body, context)];
1120
1120
  case 1:
1121
1121
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1122
1122
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1195,7 +1195,7 @@ var deserializeAws_restJson1DeleteFlowCommandError = function (output, context)
1195
1195
  case 0:
1196
1196
  _a = [__assign({}, output)];
1197
1197
  _c = {};
1198
- return [4, parseBody(output.body, context)];
1198
+ return [4, parseErrorBody(output.body, context)];
1199
1199
  case 1:
1200
1200
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1201
1201
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1274,7 +1274,7 @@ var deserializeAws_restJson1DescribeFlowCommandError = function (output, context
1274
1274
  case 0:
1275
1275
  _a = [__assign({}, output)];
1276
1276
  _c = {};
1277
- return [4, parseBody(output.body, context)];
1277
+ return [4, parseErrorBody(output.body, context)];
1278
1278
  case 1:
1279
1279
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1280
1280
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1350,7 +1350,7 @@ var deserializeAws_restJson1DescribeOfferingCommandError = function (output, con
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);
@@ -1422,7 +1422,7 @@ var deserializeAws_restJson1DescribeReservationCommandError = function (output,
1422
1422
  case 0:
1423
1423
  _a = [__assign({}, output)];
1424
1424
  _c = {};
1425
- return [4, parseBody(output.body, context)];
1425
+ return [4, parseErrorBody(output.body, context)];
1426
1426
  case 1:
1427
1427
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1428
1428
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1497,7 +1497,7 @@ var deserializeAws_restJson1GrantFlowEntitlementsCommandError = function (output
1497
1497
  case 0:
1498
1498
  _a = [__assign({}, output)];
1499
1499
  _c = {};
1500
- return [4, parseBody(output.body, context)];
1500
+ return [4, parseErrorBody(output.body, context)];
1501
1501
  case 1:
1502
1502
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1503
1503
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1580,7 +1580,7 @@ var deserializeAws_restJson1ListEntitlementsCommandError = function (output, con
1580
1580
  case 0:
1581
1581
  _a = [__assign({}, output)];
1582
1582
  _c = {};
1583
- return [4, parseBody(output.body, context)];
1583
+ return [4, parseErrorBody(output.body, context)];
1584
1584
  case 1:
1585
1585
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1586
1586
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1651,7 +1651,7 @@ var deserializeAws_restJson1ListFlowsCommandError = function (output, context) {
1651
1651
  case 0:
1652
1652
  _a = [__assign({}, output)];
1653
1653
  _c = {};
1654
- return [4, parseBody(output.body, context)];
1654
+ return [4, parseErrorBody(output.body, context)];
1655
1655
  case 1:
1656
1656
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1657
1657
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1722,7 +1722,7 @@ var deserializeAws_restJson1ListOfferingsCommandError = function (output, contex
1722
1722
  case 0:
1723
1723
  _a = [__assign({}, output)];
1724
1724
  _c = {};
1725
- return [4, parseBody(output.body, context)];
1725
+ return [4, parseErrorBody(output.body, context)];
1726
1726
  case 1:
1727
1727
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1728
1728
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1793,7 +1793,7 @@ var deserializeAws_restJson1ListReservationsCommandError = function (output, con
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);
@@ -1861,7 +1861,7 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
1861
1861
  case 0:
1862
1862
  _a = [__assign({}, output)];
1863
1863
  _c = {};
1864
- return [4, parseBody(output.body, context)];
1864
+ return [4, parseErrorBody(output.body, context)];
1865
1865
  case 1:
1866
1866
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1867
1867
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1925,7 +1925,7 @@ var deserializeAws_restJson1PurchaseOfferingCommandError = function (output, con
1925
1925
  case 0:
1926
1926
  _a = [__assign({}, output)];
1927
1927
  _c = {};
1928
- return [4, parseBody(output.body, context)];
1928
+ return [4, parseErrorBody(output.body, context)];
1929
1929
  case 1:
1930
1930
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1931
1931
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2004,7 +2004,7 @@ var deserializeAws_restJson1RemoveFlowMediaStreamCommandError = function (output
2004
2004
  case 0:
2005
2005
  _a = [__assign({}, output)];
2006
2006
  _c = {};
2007
- return [4, parseBody(output.body, context)];
2007
+ return [4, parseErrorBody(output.body, context)];
2008
2008
  case 1:
2009
2009
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2010
2010
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2083,7 +2083,7 @@ var deserializeAws_restJson1RemoveFlowOutputCommandError = function (output, con
2083
2083
  case 0:
2084
2084
  _a = [__assign({}, output)];
2085
2085
  _c = {};
2086
- return [4, parseBody(output.body, context)];
2086
+ return [4, parseErrorBody(output.body, context)];
2087
2087
  case 1:
2088
2088
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2089
2089
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2162,7 +2162,7 @@ var deserializeAws_restJson1RemoveFlowSourceCommandError = function (output, con
2162
2162
  case 0:
2163
2163
  _a = [__assign({}, output)];
2164
2164
  _c = {};
2165
- return [4, parseBody(output.body, context)];
2165
+ return [4, parseErrorBody(output.body, context)];
2166
2166
  case 1:
2167
2167
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2168
2168
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2244,7 +2244,7 @@ var deserializeAws_restJson1RemoveFlowVpcInterfaceCommandError = function (outpu
2244
2244
  case 0:
2245
2245
  _a = [__assign({}, output)];
2246
2246
  _c = {};
2247
- return [4, parseBody(output.body, context)];
2247
+ return [4, parseErrorBody(output.body, context)];
2248
2248
  case 1:
2249
2249
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2250
2250
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2323,7 +2323,7 @@ var deserializeAws_restJson1RevokeFlowEntitlementCommandError = function (output
2323
2323
  case 0:
2324
2324
  _a = [__assign({}, output)];
2325
2325
  _c = {};
2326
- return [4, parseBody(output.body, context)];
2326
+ return [4, parseErrorBody(output.body, context)];
2327
2327
  case 1:
2328
2328
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2329
2329
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2402,7 +2402,7 @@ var deserializeAws_restJson1StartFlowCommandError = function (output, context) {
2402
2402
  case 0:
2403
2403
  _a = [__assign({}, output)];
2404
2404
  _c = {};
2405
- return [4, parseBody(output.body, context)];
2405
+ return [4, parseErrorBody(output.body, context)];
2406
2406
  case 1:
2407
2407
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2408
2408
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2481,7 +2481,7 @@ var deserializeAws_restJson1StopFlowCommandError = function (output, context) {
2481
2481
  case 0:
2482
2482
  _a = [__assign({}, output)];
2483
2483
  _c = {};
2484
- return [4, parseBody(output.body, context)];
2484
+ return [4, parseErrorBody(output.body, context)];
2485
2485
  case 1:
2486
2486
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2487
2487
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2552,7 +2552,7 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
2552
2552
  case 0:
2553
2553
  _a = [__assign({}, output)];
2554
2554
  _c = {};
2555
- return [4, parseBody(output.body, context)];
2555
+ return [4, parseErrorBody(output.body, context)];
2556
2556
  case 1:
2557
2557
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2558
2558
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2611,7 +2611,7 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
2611
2611
  case 0:
2612
2612
  _a = [__assign({}, output)];
2613
2613
  _c = {};
2614
- return [4, parseBody(output.body, context)];
2614
+ return [4, parseErrorBody(output.body, context)];
2615
2615
  case 1:
2616
2616
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2617
2617
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2675,7 +2675,7 @@ var deserializeAws_restJson1UpdateFlowCommandError = function (output, context)
2675
2675
  case 0:
2676
2676
  _a = [__assign({}, output)];
2677
2677
  _c = {};
2678
- return [4, parseBody(output.body, context)];
2678
+ return [4, parseErrorBody(output.body, context)];
2679
2679
  case 1:
2680
2680
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2681
2681
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2754,7 +2754,7 @@ var deserializeAws_restJson1UpdateFlowEntitlementCommandError = function (output
2754
2754
  case 0:
2755
2755
  _a = [__assign({}, output)];
2756
2756
  _c = {};
2757
- return [4, parseBody(output.body, context)];
2757
+ return [4, parseErrorBody(output.body, context)];
2758
2758
  case 1:
2759
2759
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2760
2760
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2833,7 +2833,7 @@ var deserializeAws_restJson1UpdateFlowMediaStreamCommandError = function (output
2833
2833
  case 0:
2834
2834
  _a = [__assign({}, output)];
2835
2835
  _c = {};
2836
- return [4, parseBody(output.body, context)];
2836
+ return [4, parseErrorBody(output.body, context)];
2837
2837
  case 1:
2838
2838
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2839
2839
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2912,7 +2912,7 @@ var deserializeAws_restJson1UpdateFlowOutputCommandError = function (output, con
2912
2912
  case 0:
2913
2913
  _a = [__assign({}, output)];
2914
2914
  _c = {};
2915
- return [4, parseBody(output.body, context)];
2915
+ return [4, parseErrorBody(output.body, context)];
2916
2916
  case 1:
2917
2917
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2918
2918
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2991,7 +2991,7 @@ var deserializeAws_restJson1UpdateFlowSourceCommandError = function (output, con
2991
2991
  case 0:
2992
2992
  _a = [__assign({}, output)];
2993
2993
  _c = {};
2994
- return [4, parseBody(output.body, context)];
2994
+ return [4, parseErrorBody(output.body, context)];
2995
2995
  case 1:
2996
2996
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2997
2997
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3806,6 +3806,19 @@ var parseBody = function (streamBody, context) {
3806
3806
  return {};
3807
3807
  });
3808
3808
  };
3809
+ var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
3810
+ var value;
3811
+ var _a;
3812
+ return __generator(this, function (_b) {
3813
+ switch (_b.label) {
3814
+ case 0: return [4, parseBody(errorBody, context)];
3815
+ case 1:
3816
+ value = _b.sent();
3817
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
3818
+ return [2, value];
3819
+ }
3820
+ });
3821
+ }); };
3809
3822
  var loadRestJsonErrorCode = function (output, data) {
3810
3823
  var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
3811
3824
  var sanitizeErrorCode = function (rawValue) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-mediaconnect",
3
3
  "description": "AWS SDK for JavaScript Mediaconnect 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",