@aws-sdk/client-ivs 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-ivs
@@ -649,7 +649,7 @@ exports.deserializeAws_restJson1BatchGetChannelCommand = deserializeAws_restJson
649
649
  const deserializeAws_restJson1BatchGetChannelCommandError = async (output, context) => {
650
650
  const parsedOutput = {
651
651
  ...output,
652
- body: await parseBody(output.body, context),
652
+ body: await parseErrorBody(output.body, context),
653
653
  };
654
654
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
655
655
  const parsedBody = parsedOutput.body;
@@ -680,7 +680,7 @@ exports.deserializeAws_restJson1BatchGetStreamKeyCommand = deserializeAws_restJs
680
680
  const deserializeAws_restJson1BatchGetStreamKeyCommandError = async (output, context) => {
681
681
  const parsedOutput = {
682
682
  ...output,
683
- body: await parseBody(output.body, context),
683
+ body: await parseErrorBody(output.body, context),
684
684
  };
685
685
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
686
686
  const parsedBody = parsedOutput.body;
@@ -711,7 +711,7 @@ exports.deserializeAws_restJson1CreateChannelCommand = deserializeAws_restJson1C
711
711
  const deserializeAws_restJson1CreateChannelCommandError = async (output, context) => {
712
712
  const parsedOutput = {
713
713
  ...output,
714
- body: await parseBody(output.body, context),
714
+ body: await parseErrorBody(output.body, context),
715
715
  };
716
716
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
717
717
  switch (errorCode) {
@@ -757,7 +757,7 @@ exports.deserializeAws_restJson1CreateRecordingConfigurationCommand = deserializ
757
757
  const deserializeAws_restJson1CreateRecordingConfigurationCommandError = async (output, context) => {
758
758
  const parsedOutput = {
759
759
  ...output,
760
- body: await parseBody(output.body, context),
760
+ body: await parseErrorBody(output.body, context),
761
761
  };
762
762
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
763
763
  switch (errorCode) {
@@ -806,7 +806,7 @@ exports.deserializeAws_restJson1CreateStreamKeyCommand = deserializeAws_restJson
806
806
  const deserializeAws_restJson1CreateStreamKeyCommandError = async (output, context) => {
807
807
  const parsedOutput = {
808
808
  ...output,
809
- body: await parseBody(output.body, context),
809
+ body: await parseErrorBody(output.body, context),
810
810
  };
811
811
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
812
812
  switch (errorCode) {
@@ -849,7 +849,7 @@ exports.deserializeAws_restJson1DeleteChannelCommand = deserializeAws_restJson1D
849
849
  const deserializeAws_restJson1DeleteChannelCommandError = async (output, context) => {
850
850
  const parsedOutput = {
851
851
  ...output,
852
- body: await parseBody(output.body, context),
852
+ body: await parseErrorBody(output.body, context),
853
853
  };
854
854
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
855
855
  switch (errorCode) {
@@ -892,7 +892,7 @@ exports.deserializeAws_restJson1DeletePlaybackKeyPairCommand = deserializeAws_re
892
892
  const deserializeAws_restJson1DeletePlaybackKeyPairCommandError = async (output, context) => {
893
893
  const parsedOutput = {
894
894
  ...output,
895
- body: await parseBody(output.body, context),
895
+ body: await parseErrorBody(output.body, context),
896
896
  };
897
897
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
898
898
  switch (errorCode) {
@@ -932,7 +932,7 @@ exports.deserializeAws_restJson1DeleteRecordingConfigurationCommand = deserializ
932
932
  const deserializeAws_restJson1DeleteRecordingConfigurationCommandError = async (output, context) => {
933
933
  const parsedOutput = {
934
934
  ...output,
935
- body: await parseBody(output.body, context),
935
+ body: await parseErrorBody(output.body, context),
936
936
  };
937
937
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
938
938
  switch (errorCode) {
@@ -975,7 +975,7 @@ exports.deserializeAws_restJson1DeleteStreamKeyCommand = deserializeAws_restJson
975
975
  const deserializeAws_restJson1DeleteStreamKeyCommandError = async (output, context) => {
976
976
  const parsedOutput = {
977
977
  ...output,
978
- body: await parseBody(output.body, context),
978
+ body: await parseErrorBody(output.body, context),
979
979
  };
980
980
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
981
981
  switch (errorCode) {
@@ -1018,7 +1018,7 @@ exports.deserializeAws_restJson1GetChannelCommand = deserializeAws_restJson1GetC
1018
1018
  const deserializeAws_restJson1GetChannelCommandError = async (output, context) => {
1019
1019
  const parsedOutput = {
1020
1020
  ...output,
1021
- body: await parseBody(output.body, context),
1021
+ body: await parseErrorBody(output.body, context),
1022
1022
  };
1023
1023
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1024
1024
  switch (errorCode) {
@@ -1058,7 +1058,7 @@ exports.deserializeAws_restJson1GetPlaybackKeyPairCommand = deserializeAws_restJ
1058
1058
  const deserializeAws_restJson1GetPlaybackKeyPairCommandError = async (output, context) => {
1059
1059
  const parsedOutput = {
1060
1060
  ...output,
1061
- body: await parseBody(output.body, context),
1061
+ body: await parseErrorBody(output.body, context),
1062
1062
  };
1063
1063
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1064
1064
  switch (errorCode) {
@@ -1098,7 +1098,7 @@ exports.deserializeAws_restJson1GetRecordingConfigurationCommand = deserializeAw
1098
1098
  const deserializeAws_restJson1GetRecordingConfigurationCommandError = async (output, context) => {
1099
1099
  const parsedOutput = {
1100
1100
  ...output,
1101
- body: await parseBody(output.body, context),
1101
+ body: await parseErrorBody(output.body, context),
1102
1102
  };
1103
1103
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1104
1104
  switch (errorCode) {
@@ -1141,7 +1141,7 @@ exports.deserializeAws_restJson1GetStreamCommand = deserializeAws_restJson1GetSt
1141
1141
  const deserializeAws_restJson1GetStreamCommandError = async (output, context) => {
1142
1142
  const parsedOutput = {
1143
1143
  ...output,
1144
- body: await parseBody(output.body, context),
1144
+ body: await parseErrorBody(output.body, context),
1145
1145
  };
1146
1146
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1147
1147
  switch (errorCode) {
@@ -1184,7 +1184,7 @@ exports.deserializeAws_restJson1GetStreamKeyCommand = deserializeAws_restJson1Ge
1184
1184
  const deserializeAws_restJson1GetStreamKeyCommandError = async (output, context) => {
1185
1185
  const parsedOutput = {
1186
1186
  ...output,
1187
- body: await parseBody(output.body, context),
1187
+ body: await parseErrorBody(output.body, context),
1188
1188
  };
1189
1189
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1190
1190
  switch (errorCode) {
@@ -1224,7 +1224,7 @@ exports.deserializeAws_restJson1GetStreamSessionCommand = deserializeAws_restJso
1224
1224
  const deserializeAws_restJson1GetStreamSessionCommandError = async (output, context) => {
1225
1225
  const parsedOutput = {
1226
1226
  ...output,
1227
- body: await parseBody(output.body, context),
1227
+ body: await parseErrorBody(output.body, context),
1228
1228
  };
1229
1229
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1230
1230
  switch (errorCode) {
@@ -1264,7 +1264,7 @@ exports.deserializeAws_restJson1ImportPlaybackKeyPairCommand = deserializeAws_re
1264
1264
  const deserializeAws_restJson1ImportPlaybackKeyPairCommandError = async (output, context) => {
1265
1265
  const parsedOutput = {
1266
1266
  ...output,
1267
- body: await parseBody(output.body, context),
1267
+ body: await parseErrorBody(output.body, context),
1268
1268
  };
1269
1269
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1270
1270
  switch (errorCode) {
@@ -1313,7 +1313,7 @@ exports.deserializeAws_restJson1ListChannelsCommand = deserializeAws_restJson1Li
1313
1313
  const deserializeAws_restJson1ListChannelsCommandError = 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_restJson1ListPlaybackKeyPairsCommand = deserializeAws_res
1356
1356
  const deserializeAws_restJson1ListPlaybackKeyPairsCommandError = 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) {
@@ -1396,7 +1396,7 @@ exports.deserializeAws_restJson1ListRecordingConfigurationsCommand = deserialize
1396
1396
  const deserializeAws_restJson1ListRecordingConfigurationsCommandError = async (output, context) => {
1397
1397
  const parsedOutput = {
1398
1398
  ...output,
1399
- body: await parseBody(output.body, context),
1399
+ body: await parseErrorBody(output.body, context),
1400
1400
  };
1401
1401
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1402
1402
  switch (errorCode) {
@@ -1439,7 +1439,7 @@ exports.deserializeAws_restJson1ListStreamKeysCommand = deserializeAws_restJson1
1439
1439
  const deserializeAws_restJson1ListStreamKeysCommandError = 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) {
@@ -1482,7 +1482,7 @@ exports.deserializeAws_restJson1ListStreamsCommand = deserializeAws_restJson1Lis
1482
1482
  const deserializeAws_restJson1ListStreamsCommandError = async (output, context) => {
1483
1483
  const parsedOutput = {
1484
1484
  ...output,
1485
- body: await parseBody(output.body, context),
1485
+ body: await parseErrorBody(output.body, context),
1486
1486
  };
1487
1487
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1488
1488
  switch (errorCode) {
@@ -1522,7 +1522,7 @@ exports.deserializeAws_restJson1ListStreamSessionsCommand = deserializeAws_restJ
1522
1522
  const deserializeAws_restJson1ListStreamSessionsCommandError = async (output, context) => {
1523
1523
  const parsedOutput = {
1524
1524
  ...output,
1525
- body: await parseBody(output.body, context),
1525
+ body: await parseErrorBody(output.body, context),
1526
1526
  };
1527
1527
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1528
1528
  switch (errorCode) {
@@ -1562,7 +1562,7 @@ exports.deserializeAws_restJson1ListTagsForResourceCommand = deserializeAws_rest
1562
1562
  const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
1563
1563
  const parsedOutput = {
1564
1564
  ...output,
1565
- body: await parseBody(output.body, context),
1565
+ body: await parseErrorBody(output.body, context),
1566
1566
  };
1567
1567
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1568
1568
  switch (errorCode) {
@@ -1599,7 +1599,7 @@ exports.deserializeAws_restJson1PutMetadataCommand = deserializeAws_restJson1Put
1599
1599
  const deserializeAws_restJson1PutMetadataCommandError = async (output, context) => {
1600
1600
  const parsedOutput = {
1601
1601
  ...output,
1602
- body: await parseBody(output.body, context),
1602
+ body: await parseErrorBody(output.body, context),
1603
1603
  };
1604
1604
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1605
1605
  switch (errorCode) {
@@ -1642,7 +1642,7 @@ exports.deserializeAws_restJson1StopStreamCommand = deserializeAws_restJson1Stop
1642
1642
  const deserializeAws_restJson1StopStreamCommandError = async (output, context) => {
1643
1643
  const parsedOutput = {
1644
1644
  ...output,
1645
- body: await parseBody(output.body, context),
1645
+ body: await parseErrorBody(output.body, context),
1646
1646
  };
1647
1647
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1648
1648
  switch (errorCode) {
@@ -1685,7 +1685,7 @@ exports.deserializeAws_restJson1TagResourceCommand = deserializeAws_restJson1Tag
1685
1685
  const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
1686
1686
  const parsedOutput = {
1687
1687
  ...output,
1688
- body: await parseBody(output.body, context),
1688
+ body: await parseErrorBody(output.body, context),
1689
1689
  };
1690
1690
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1691
1691
  switch (errorCode) {
@@ -1722,7 +1722,7 @@ exports.deserializeAws_restJson1UntagResourceCommand = deserializeAws_restJson1U
1722
1722
  const deserializeAws_restJson1UntagResourceCommandError = 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) {
@@ -1762,7 +1762,7 @@ exports.deserializeAws_restJson1UpdateChannelCommand = deserializeAws_restJson1U
1762
1762
  const deserializeAws_restJson1UpdateChannelCommandError = async (output, context) => {
1763
1763
  const parsedOutput = {
1764
1764
  ...output,
1765
- body: await parseBody(output.body, context),
1765
+ body: await parseErrorBody(output.body, context),
1766
1766
  };
1767
1767
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1768
1768
  switch (errorCode) {
@@ -2287,6 +2287,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
2287
2287
  }
2288
2288
  return {};
2289
2289
  });
2290
+ const parseErrorBody = async (errorBody, context) => {
2291
+ var _a;
2292
+ const value = await parseBody(errorBody, context);
2293
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
2294
+ return value;
2295
+ };
2290
2296
  const loadRestJsonErrorCode = (output, data) => {
2291
2297
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
2292
2298
  const sanitizeErrorCode = (rawValue) => {
@@ -718,7 +718,7 @@ var deserializeAws_restJson1BatchGetChannelCommandError = function (output, cont
718
718
  case 0:
719
719
  _a = [__assign({}, output)];
720
720
  _b = {};
721
- return [4, parseBody(output.body, context)];
721
+ return [4, parseErrorBody(output.body, context)];
722
722
  case 1:
723
723
  parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
724
724
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -767,7 +767,7 @@ var deserializeAws_restJson1BatchGetStreamKeyCommandError = function (output, co
767
767
  case 0:
768
768
  _a = [__assign({}, output)];
769
769
  _b = {};
770
- return [4, parseBody(output.body, context)];
770
+ return [4, parseErrorBody(output.body, context)];
771
771
  case 1:
772
772
  parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
773
773
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -816,7 +816,7 @@ var deserializeAws_restJson1CreateChannelCommandError = function (output, contex
816
816
  case 0:
817
817
  _a = [__assign({}, output)];
818
818
  _c = {};
819
- return [4, parseBody(output.body, context)];
819
+ return [4, parseErrorBody(output.body, context)];
820
820
  case 1:
821
821
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
822
822
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -888,7 +888,7 @@ var deserializeAws_restJson1CreateRecordingConfigurationCommandError = function
888
888
  case 0:
889
889
  _a = [__assign({}, output)];
890
890
  _c = {};
891
- return [4, parseBody(output.body, context)];
891
+ return [4, parseErrorBody(output.body, context)];
892
892
  case 1:
893
893
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
894
894
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -964,7 +964,7 @@ var deserializeAws_restJson1CreateStreamKeyCommandError = function (output, cont
964
964
  case 0:
965
965
  _a = [__assign({}, output)];
966
966
  _c = {};
967
- return [4, parseBody(output.body, context)];
967
+ return [4, parseErrorBody(output.body, context)];
968
968
  case 1:
969
969
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
970
970
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1031,7 +1031,7 @@ var deserializeAws_restJson1DeleteChannelCommandError = function (output, contex
1031
1031
  case 0:
1032
1032
  _a = [__assign({}, output)];
1033
1033
  _c = {};
1034
- return [4, parseBody(output.body, context)];
1034
+ return [4, parseErrorBody(output.body, context)];
1035
1035
  case 1:
1036
1036
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1037
1037
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1098,7 +1098,7 @@ var deserializeAws_restJson1DeletePlaybackKeyPairCommandError = function (output
1098
1098
  case 0:
1099
1099
  _a = [__assign({}, output)];
1100
1100
  _c = {};
1101
- return [4, parseBody(output.body, context)];
1101
+ return [4, parseErrorBody(output.body, context)];
1102
1102
  case 1:
1103
1103
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1104
1104
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1161,7 +1161,7 @@ var deserializeAws_restJson1DeleteRecordingConfigurationCommandError = function
1161
1161
  case 0:
1162
1162
  _a = [__assign({}, output)];
1163
1163
  _c = {};
1164
- return [4, parseBody(output.body, context)];
1164
+ return [4, parseErrorBody(output.body, context)];
1165
1165
  case 1:
1166
1166
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1167
1167
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1228,7 +1228,7 @@ var deserializeAws_restJson1DeleteStreamKeyCommandError = function (output, cont
1228
1228
  case 0:
1229
1229
  _a = [__assign({}, output)];
1230
1230
  _c = {};
1231
- return [4, parseBody(output.body, context)];
1231
+ return [4, parseErrorBody(output.body, context)];
1232
1232
  case 1:
1233
1233
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1234
1234
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1296,7 +1296,7 @@ var deserializeAws_restJson1GetChannelCommandError = function (output, context)
1296
1296
  case 0:
1297
1297
  _a = [__assign({}, output)];
1298
1298
  _c = {};
1299
- return [4, parseBody(output.body, context)];
1299
+ return [4, parseErrorBody(output.body, context)];
1300
1300
  case 1:
1301
1301
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1302
1302
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1360,7 +1360,7 @@ var deserializeAws_restJson1GetPlaybackKeyPairCommandError = function (output, c
1360
1360
  case 0:
1361
1361
  _a = [__assign({}, output)];
1362
1362
  _c = {};
1363
- return [4, parseBody(output.body, context)];
1363
+ return [4, parseErrorBody(output.body, context)];
1364
1364
  case 1:
1365
1365
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1366
1366
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1424,7 +1424,7 @@ var deserializeAws_restJson1GetRecordingConfigurationCommandError = function (ou
1424
1424
  case 0:
1425
1425
  _a = [__assign({}, output)];
1426
1426
  _c = {};
1427
- return [4, parseBody(output.body, context)];
1427
+ return [4, parseErrorBody(output.body, context)];
1428
1428
  case 1:
1429
1429
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1430
1430
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1492,7 +1492,7 @@ var deserializeAws_restJson1GetStreamCommandError = function (output, context) {
1492
1492
  case 0:
1493
1493
  _a = [__assign({}, output)];
1494
1494
  _c = {};
1495
- return [4, parseBody(output.body, context)];
1495
+ return [4, parseErrorBody(output.body, context)];
1496
1496
  case 1:
1497
1497
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1498
1498
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1560,7 +1560,7 @@ var deserializeAws_restJson1GetStreamKeyCommandError = function (output, context
1560
1560
  case 0:
1561
1561
  _a = [__assign({}, output)];
1562
1562
  _c = {};
1563
- return [4, parseBody(output.body, context)];
1563
+ return [4, parseErrorBody(output.body, context)];
1564
1564
  case 1:
1565
1565
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1566
1566
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1624,7 +1624,7 @@ var deserializeAws_restJson1GetStreamSessionCommandError = function (output, con
1624
1624
  case 0:
1625
1625
  _a = [__assign({}, output)];
1626
1626
  _c = {};
1627
- return [4, parseBody(output.body, context)];
1627
+ return [4, parseErrorBody(output.body, context)];
1628
1628
  case 1:
1629
1629
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1630
1630
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1688,7 +1688,7 @@ var deserializeAws_restJson1ImportPlaybackKeyPairCommandError = function (output
1688
1688
  case 0:
1689
1689
  _a = [__assign({}, output)];
1690
1690
  _c = {};
1691
- return [4, parseBody(output.body, context)];
1691
+ return [4, parseErrorBody(output.body, context)];
1692
1692
  case 1:
1693
1693
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1694
1694
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1763,7 +1763,7 @@ var deserializeAws_restJson1ListChannelsCommandError = function (output, context
1763
1763
  case 0:
1764
1764
  _a = [__assign({}, output)];
1765
1765
  _c = {};
1766
- return [4, parseBody(output.body, context)];
1766
+ return [4, parseErrorBody(output.body, context)];
1767
1767
  case 1:
1768
1768
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1769
1769
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1830,7 +1830,7 @@ var deserializeAws_restJson1ListPlaybackKeyPairsCommandError = function (output,
1830
1830
  case 0:
1831
1831
  _a = [__assign({}, output)];
1832
1832
  _c = {};
1833
- return [4, parseBody(output.body, context)];
1833
+ return [4, parseErrorBody(output.body, context)];
1834
1834
  case 1:
1835
1835
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1836
1836
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1893,7 +1893,7 @@ var deserializeAws_restJson1ListRecordingConfigurationsCommandError = function (
1893
1893
  case 0:
1894
1894
  _a = [__assign({}, output)];
1895
1895
  _c = {};
1896
- return [4, parseBody(output.body, context)];
1896
+ return [4, parseErrorBody(output.body, context)];
1897
1897
  case 1:
1898
1898
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1899
1899
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1960,7 +1960,7 @@ var deserializeAws_restJson1ListStreamKeysCommandError = function (output, conte
1960
1960
  case 0:
1961
1961
  _a = [__assign({}, output)];
1962
1962
  _c = {};
1963
- return [4, parseBody(output.body, context)];
1963
+ return [4, parseErrorBody(output.body, context)];
1964
1964
  case 1:
1965
1965
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1966
1966
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2027,7 +2027,7 @@ var deserializeAws_restJson1ListStreamsCommandError = function (output, context)
2027
2027
  case 0:
2028
2028
  _a = [__assign({}, output)];
2029
2029
  _c = {};
2030
- return [4, parseBody(output.body, context)];
2030
+ return [4, parseErrorBody(output.body, context)];
2031
2031
  case 1:
2032
2032
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2033
2033
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2090,7 +2090,7 @@ var deserializeAws_restJson1ListStreamSessionsCommandError = function (output, c
2090
2090
  case 0:
2091
2091
  _a = [__assign({}, output)];
2092
2092
  _c = {};
2093
- return [4, parseBody(output.body, context)];
2093
+ return [4, parseErrorBody(output.body, context)];
2094
2094
  case 1:
2095
2095
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2096
2096
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2154,7 +2154,7 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
2154
2154
  case 0:
2155
2155
  _a = [__assign({}, output)];
2156
2156
  _c = {};
2157
- return [4, parseBody(output.body, context)];
2157
+ return [4, parseErrorBody(output.body, context)];
2158
2158
  case 1:
2159
2159
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2160
2160
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2213,7 +2213,7 @@ var deserializeAws_restJson1PutMetadataCommandError = function (output, context)
2213
2213
  case 0:
2214
2214
  _a = [__assign({}, output)];
2215
2215
  _c = {};
2216
- return [4, parseBody(output.body, context)];
2216
+ return [4, parseErrorBody(output.body, context)];
2217
2217
  case 1:
2218
2218
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2219
2219
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2280,7 +2280,7 @@ var deserializeAws_restJson1StopStreamCommandError = function (output, context)
2280
2280
  case 0:
2281
2281
  _a = [__assign({}, output)];
2282
2282
  _c = {};
2283
- return [4, parseBody(output.body, context)];
2283
+ return [4, parseErrorBody(output.body, context)];
2284
2284
  case 1:
2285
2285
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2286
2286
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2347,7 +2347,7 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
2347
2347
  case 0:
2348
2348
  _a = [__assign({}, output)];
2349
2349
  _c = {};
2350
- return [4, parseBody(output.body, context)];
2350
+ return [4, parseErrorBody(output.body, context)];
2351
2351
  case 1:
2352
2352
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2353
2353
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2406,7 +2406,7 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
2406
2406
  case 0:
2407
2407
  _a = [__assign({}, output)];
2408
2408
  _c = {};
2409
- return [4, parseBody(output.body, context)];
2409
+ return [4, parseErrorBody(output.body, context)];
2410
2410
  case 1:
2411
2411
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2412
2412
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2470,7 +2470,7 @@ var deserializeAws_restJson1UpdateChannelCommandError = function (output, contex
2470
2470
  case 0:
2471
2471
  _a = [__assign({}, output)];
2472
2472
  _c = {};
2473
- return [4, parseBody(output.body, context)];
2473
+ return [4, parseErrorBody(output.body, context)];
2474
2474
  case 1:
2475
2475
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2476
2476
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3003,6 +3003,19 @@ var parseBody = function (streamBody, context) {
3003
3003
  return {};
3004
3004
  });
3005
3005
  };
3006
+ var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
3007
+ var value;
3008
+ var _a;
3009
+ return __generator(this, function (_b) {
3010
+ switch (_b.label) {
3011
+ case 0: return [4, parseBody(errorBody, context)];
3012
+ case 1:
3013
+ value = _b.sent();
3014
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
3015
+ return [2, value];
3016
+ }
3017
+ });
3018
+ }); };
3006
3019
  var loadRestJsonErrorCode = function (output, data) {
3007
3020
  var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
3008
3021
  var sanitizeErrorCode = function (rawValue) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-ivs",
3
3
  "description": "AWS SDK for JavaScript Ivs 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",