@aws-sdk/client-kafka 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-kafka
@@ -812,7 +812,7 @@ exports.deserializeAws_restJson1BatchAssociateScramSecretCommand = deserializeAw
812
812
  const deserializeAws_restJson1BatchAssociateScramSecretCommandError = async (output, context) => {
813
813
  const parsedOutput = {
814
814
  ...output,
815
- body: await parseBody(output.body, context),
815
+ body: await parseErrorBody(output.body, context),
816
816
  };
817
817
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
818
818
  switch (errorCode) {
@@ -867,7 +867,7 @@ exports.deserializeAws_restJson1BatchDisassociateScramSecretCommand = deserializ
867
867
  const deserializeAws_restJson1BatchDisassociateScramSecretCommandError = async (output, context) => {
868
868
  const parsedOutput = {
869
869
  ...output,
870
- body: await parseBody(output.body, context),
870
+ body: await parseErrorBody(output.body, context),
871
871
  };
872
872
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
873
873
  switch (errorCode) {
@@ -925,7 +925,7 @@ exports.deserializeAws_restJson1CreateClusterCommand = deserializeAws_restJson1C
925
925
  const deserializeAws_restJson1CreateClusterCommandError = async (output, context) => {
926
926
  const parsedOutput = {
927
927
  ...output,
928
- body: await parseBody(output.body, context),
928
+ body: await parseErrorBody(output.body, context),
929
929
  };
930
930
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
931
931
  switch (errorCode) {
@@ -986,7 +986,7 @@ exports.deserializeAws_restJson1CreateClusterV2Command = deserializeAws_restJson
986
986
  const deserializeAws_restJson1CreateClusterV2CommandError = async (output, context) => {
987
987
  const parsedOutput = {
988
988
  ...output,
989
- body: await parseBody(output.body, context),
989
+ body: await parseErrorBody(output.body, context),
990
990
  };
991
991
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
992
992
  switch (errorCode) {
@@ -1050,7 +1050,7 @@ exports.deserializeAws_restJson1CreateConfigurationCommand = deserializeAws_rest
1050
1050
  const deserializeAws_restJson1CreateConfigurationCommandError = async (output, context) => {
1051
1051
  const parsedOutput = {
1052
1052
  ...output,
1053
- body: await parseBody(output.body, context),
1053
+ body: await parseErrorBody(output.body, context),
1054
1054
  };
1055
1055
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1056
1056
  switch (errorCode) {
@@ -1105,7 +1105,7 @@ exports.deserializeAws_restJson1DeleteClusterCommand = deserializeAws_restJson1D
1105
1105
  const deserializeAws_restJson1DeleteClusterCommandError = async (output, context) => {
1106
1106
  const parsedOutput = {
1107
1107
  ...output,
1108
- body: await parseBody(output.body, context),
1108
+ body: await parseErrorBody(output.body, context),
1109
1109
  };
1110
1110
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1111
1111
  switch (errorCode) {
@@ -1151,7 +1151,7 @@ exports.deserializeAws_restJson1DeleteConfigurationCommand = deserializeAws_rest
1151
1151
  const deserializeAws_restJson1DeleteConfigurationCommandError = async (output, context) => {
1152
1152
  const parsedOutput = {
1153
1153
  ...output,
1154
- body: await parseBody(output.body, context),
1154
+ body: await parseErrorBody(output.body, context),
1155
1155
  };
1156
1156
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1157
1157
  switch (errorCode) {
@@ -1194,7 +1194,7 @@ exports.deserializeAws_restJson1DescribeClusterCommand = deserializeAws_restJson
1194
1194
  const deserializeAws_restJson1DescribeClusterCommandError = async (output, context) => {
1195
1195
  const parsedOutput = {
1196
1196
  ...output,
1197
- body: await parseBody(output.body, context),
1197
+ body: await parseErrorBody(output.body, context),
1198
1198
  };
1199
1199
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1200
1200
  switch (errorCode) {
@@ -1240,7 +1240,7 @@ exports.deserializeAws_restJson1DescribeClusterOperationCommand = deserializeAws
1240
1240
  const deserializeAws_restJson1DescribeClusterOperationCommandError = async (output, context) => {
1241
1241
  const parsedOutput = {
1242
1242
  ...output,
1243
- body: await parseBody(output.body, context),
1243
+ body: await parseErrorBody(output.body, context),
1244
1244
  };
1245
1245
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1246
1246
  switch (errorCode) {
@@ -1286,7 +1286,7 @@ exports.deserializeAws_restJson1DescribeClusterV2Command = deserializeAws_restJs
1286
1286
  const deserializeAws_restJson1DescribeClusterV2CommandError = async (output, context) => {
1287
1287
  const parsedOutput = {
1288
1288
  ...output,
1289
- body: await parseBody(output.body, context),
1289
+ body: await parseErrorBody(output.body, context),
1290
1290
  };
1291
1291
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1292
1292
  switch (errorCode) {
@@ -1350,7 +1350,7 @@ exports.deserializeAws_restJson1DescribeConfigurationCommand = deserializeAws_re
1350
1350
  const deserializeAws_restJson1DescribeConfigurationCommandError = async (output, context) => {
1351
1351
  const parsedOutput = {
1352
1352
  ...output,
1353
- body: await parseBody(output.body, context),
1353
+ body: await parseErrorBody(output.body, context),
1354
1354
  };
1355
1355
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1356
1356
  switch (errorCode) {
@@ -1411,7 +1411,7 @@ exports.deserializeAws_restJson1DescribeConfigurationRevisionCommand = deseriali
1411
1411
  const deserializeAws_restJson1DescribeConfigurationRevisionCommandError = async (output, context) => {
1412
1412
  const parsedOutput = {
1413
1413
  ...output,
1414
- body: await parseBody(output.body, context),
1414
+ body: await parseErrorBody(output.body, context),
1415
1415
  };
1416
1416
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1417
1417
  switch (errorCode) {
@@ -1478,7 +1478,7 @@ exports.deserializeAws_restJson1GetBootstrapBrokersCommand = deserializeAws_rest
1478
1478
  const deserializeAws_restJson1GetBootstrapBrokersCommandError = async (output, context) => {
1479
1479
  const parsedOutput = {
1480
1480
  ...output,
1481
- body: await parseBody(output.body, context),
1481
+ body: await parseErrorBody(output.body, context),
1482
1482
  };
1483
1483
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1484
1484
  switch (errorCode) {
@@ -1524,7 +1524,7 @@ exports.deserializeAws_restJson1GetCompatibleKafkaVersionsCommand = deserializeA
1524
1524
  const deserializeAws_restJson1GetCompatibleKafkaVersionsCommandError = async (output, context) => {
1525
1525
  const parsedOutput = {
1526
1526
  ...output,
1527
- body: await parseBody(output.body, context),
1527
+ body: await parseErrorBody(output.body, context),
1528
1528
  };
1529
1529
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1530
1530
  switch (errorCode) {
@@ -1579,7 +1579,7 @@ exports.deserializeAws_restJson1ListClusterOperationsCommand = deserializeAws_re
1579
1579
  const deserializeAws_restJson1ListClusterOperationsCommandError = async (output, context) => {
1580
1580
  const parsedOutput = {
1581
1581
  ...output,
1582
- body: await parseBody(output.body, context),
1582
+ body: await parseErrorBody(output.body, context),
1583
1583
  };
1584
1584
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1585
1585
  switch (errorCode) {
@@ -1625,7 +1625,7 @@ exports.deserializeAws_restJson1ListClustersCommand = deserializeAws_restJson1Li
1625
1625
  const deserializeAws_restJson1ListClustersCommandError = async (output, context) => {
1626
1626
  const parsedOutput = {
1627
1627
  ...output,
1628
- body: await parseBody(output.body, context),
1628
+ body: await parseErrorBody(output.body, context),
1629
1629
  };
1630
1630
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1631
1631
  switch (errorCode) {
@@ -1671,7 +1671,7 @@ exports.deserializeAws_restJson1ListClustersV2Command = deserializeAws_restJson1
1671
1671
  const deserializeAws_restJson1ListClustersV2CommandError = async (output, context) => {
1672
1672
  const parsedOutput = {
1673
1673
  ...output,
1674
- body: await parseBody(output.body, context),
1674
+ body: await parseErrorBody(output.body, context),
1675
1675
  };
1676
1676
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1677
1677
  switch (errorCode) {
@@ -1717,7 +1717,7 @@ exports.deserializeAws_restJson1ListConfigurationRevisionsCommand = deserializeA
1717
1717
  const deserializeAws_restJson1ListConfigurationRevisionsCommandError = async (output, context) => {
1718
1718
  const parsedOutput = {
1719
1719
  ...output,
1720
- body: await parseBody(output.body, context),
1720
+ body: await parseErrorBody(output.body, context),
1721
1721
  };
1722
1722
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1723
1723
  switch (errorCode) {
@@ -1769,7 +1769,7 @@ exports.deserializeAws_restJson1ListConfigurationsCommand = deserializeAws_restJ
1769
1769
  const deserializeAws_restJson1ListConfigurationsCommandError = async (output, context) => {
1770
1770
  const parsedOutput = {
1771
1771
  ...output,
1772
- body: await parseBody(output.body, context),
1772
+ body: await parseErrorBody(output.body, context),
1773
1773
  };
1774
1774
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1775
1775
  switch (errorCode) {
@@ -1818,7 +1818,7 @@ exports.deserializeAws_restJson1ListKafkaVersionsCommand = deserializeAws_restJs
1818
1818
  const deserializeAws_restJson1ListKafkaVersionsCommandError = async (output, context) => {
1819
1819
  const parsedOutput = {
1820
1820
  ...output,
1821
- body: await parseBody(output.body, context),
1821
+ body: await parseErrorBody(output.body, context),
1822
1822
  };
1823
1823
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1824
1824
  switch (errorCode) {
@@ -1864,7 +1864,7 @@ exports.deserializeAws_restJson1ListNodesCommand = deserializeAws_restJson1ListN
1864
1864
  const deserializeAws_restJson1ListNodesCommandError = async (output, context) => {
1865
1865
  const parsedOutput = {
1866
1866
  ...output,
1867
- body: await parseBody(output.body, context),
1867
+ body: await parseErrorBody(output.body, context),
1868
1868
  };
1869
1869
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1870
1870
  switch (errorCode) {
@@ -1910,7 +1910,7 @@ exports.deserializeAws_restJson1ListScramSecretsCommand = deserializeAws_restJso
1910
1910
  const deserializeAws_restJson1ListScramSecretsCommandError = async (output, context) => {
1911
1911
  const parsedOutput = {
1912
1912
  ...output,
1913
- body: await parseBody(output.body, context),
1913
+ body: await parseErrorBody(output.body, context),
1914
1914
  };
1915
1915
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1916
1916
  switch (errorCode) {
@@ -1962,7 +1962,7 @@ exports.deserializeAws_restJson1ListTagsForResourceCommand = deserializeAws_rest
1962
1962
  const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
1963
1963
  const parsedOutput = {
1964
1964
  ...output,
1965
- body: await parseBody(output.body, context),
1965
+ body: await parseErrorBody(output.body, context),
1966
1966
  };
1967
1967
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1968
1968
  switch (errorCode) {
@@ -2005,7 +2005,7 @@ exports.deserializeAws_restJson1RebootBrokerCommand = deserializeAws_restJson1Re
2005
2005
  const deserializeAws_restJson1RebootBrokerCommandError = async (output, context) => {
2006
2006
  const parsedOutput = {
2007
2007
  ...output,
2008
- body: await parseBody(output.body, context),
2008
+ body: await parseErrorBody(output.body, context),
2009
2009
  };
2010
2010
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2011
2011
  switch (errorCode) {
@@ -2054,7 +2054,7 @@ exports.deserializeAws_restJson1TagResourceCommand = deserializeAws_restJson1Tag
2054
2054
  const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
2055
2055
  const parsedOutput = {
2056
2056
  ...output,
2057
- body: await parseBody(output.body, context),
2057
+ body: await parseErrorBody(output.body, context),
2058
2058
  };
2059
2059
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2060
2060
  switch (errorCode) {
@@ -2091,7 +2091,7 @@ exports.deserializeAws_restJson1UntagResourceCommand = deserializeAws_restJson1U
2091
2091
  const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
2092
2092
  const parsedOutput = {
2093
2093
  ...output,
2094
- body: await parseBody(output.body, context),
2094
+ body: await parseErrorBody(output.body, context),
2095
2095
  };
2096
2096
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2097
2097
  switch (errorCode) {
@@ -2134,7 +2134,7 @@ exports.deserializeAws_restJson1UpdateBrokerCountCommand = deserializeAws_restJs
2134
2134
  const deserializeAws_restJson1UpdateBrokerCountCommandError = async (output, context) => {
2135
2135
  const parsedOutput = {
2136
2136
  ...output,
2137
- body: await parseBody(output.body, context),
2137
+ body: await parseErrorBody(output.body, context),
2138
2138
  };
2139
2139
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2140
2140
  switch (errorCode) {
@@ -2183,7 +2183,7 @@ exports.deserializeAws_restJson1UpdateBrokerStorageCommand = deserializeAws_rest
2183
2183
  const deserializeAws_restJson1UpdateBrokerStorageCommandError = async (output, context) => {
2184
2184
  const parsedOutput = {
2185
2185
  ...output,
2186
- body: await parseBody(output.body, context),
2186
+ body: await parseErrorBody(output.body, context),
2187
2187
  };
2188
2188
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2189
2189
  switch (errorCode) {
@@ -2232,7 +2232,7 @@ exports.deserializeAws_restJson1UpdateBrokerTypeCommand = deserializeAws_restJso
2232
2232
  const deserializeAws_restJson1UpdateBrokerTypeCommandError = async (output, context) => {
2233
2233
  const parsedOutput = {
2234
2234
  ...output,
2235
- body: await parseBody(output.body, context),
2235
+ body: await parseErrorBody(output.body, context),
2236
2236
  };
2237
2237
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2238
2238
  switch (errorCode) {
@@ -2287,7 +2287,7 @@ exports.deserializeAws_restJson1UpdateClusterConfigurationCommand = deserializeA
2287
2287
  const deserializeAws_restJson1UpdateClusterConfigurationCommandError = async (output, context) => {
2288
2288
  const parsedOutput = {
2289
2289
  ...output,
2290
- body: await parseBody(output.body, context),
2290
+ body: await parseErrorBody(output.body, context),
2291
2291
  };
2292
2292
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2293
2293
  switch (errorCode) {
@@ -2339,7 +2339,7 @@ exports.deserializeAws_restJson1UpdateClusterKafkaVersionCommand = deserializeAw
2339
2339
  const deserializeAws_restJson1UpdateClusterKafkaVersionCommandError = async (output, context) => {
2340
2340
  const parsedOutput = {
2341
2341
  ...output,
2342
- body: await parseBody(output.body, context),
2342
+ body: await parseErrorBody(output.body, context),
2343
2343
  };
2344
2344
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2345
2345
  switch (errorCode) {
@@ -2394,7 +2394,7 @@ exports.deserializeAws_restJson1UpdateConfigurationCommand = deserializeAws_rest
2394
2394
  const deserializeAws_restJson1UpdateConfigurationCommandError = async (output, context) => {
2395
2395
  const parsedOutput = {
2396
2396
  ...output,
2397
- body: await parseBody(output.body, context),
2397
+ body: await parseErrorBody(output.body, context),
2398
2398
  };
2399
2399
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2400
2400
  switch (errorCode) {
@@ -2446,7 +2446,7 @@ exports.deserializeAws_restJson1UpdateConnectivityCommand = deserializeAws_restJ
2446
2446
  const deserializeAws_restJson1UpdateConnectivityCommandError = async (output, context) => {
2447
2447
  const parsedOutput = {
2448
2448
  ...output,
2449
- body: await parseBody(output.body, context),
2449
+ body: await parseErrorBody(output.body, context),
2450
2450
  };
2451
2451
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2452
2452
  switch (errorCode) {
@@ -2498,7 +2498,7 @@ exports.deserializeAws_restJson1UpdateMonitoringCommand = deserializeAws_restJso
2498
2498
  const deserializeAws_restJson1UpdateMonitoringCommandError = async (output, context) => {
2499
2499
  const parsedOutput = {
2500
2500
  ...output,
2501
- body: await parseBody(output.body, context),
2501
+ body: await parseErrorBody(output.body, context),
2502
2502
  };
2503
2503
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2504
2504
  switch (errorCode) {
@@ -2547,7 +2547,7 @@ exports.deserializeAws_restJson1UpdateSecurityCommand = deserializeAws_restJson1
2547
2547
  const deserializeAws_restJson1UpdateSecurityCommandError = async (output, context) => {
2548
2548
  const parsedOutput = {
2549
2549
  ...output,
2550
- body: await parseBody(output.body, context),
2550
+ body: await parseErrorBody(output.body, context),
2551
2551
  };
2552
2552
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2553
2553
  switch (errorCode) {
@@ -3595,6 +3595,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
3595
3595
  }
3596
3596
  return {};
3597
3597
  });
3598
+ const parseErrorBody = async (errorBody, context) => {
3599
+ var _a;
3600
+ const value = await parseBody(errorBody, context);
3601
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
3602
+ return value;
3603
+ };
3598
3604
  const loadRestJsonErrorCode = (output, data) => {
3599
3605
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
3600
3606
  const sanitizeErrorCode = (rawValue) => {
@@ -937,7 +937,7 @@ var deserializeAws_restJson1BatchAssociateScramSecretCommandError = function (ou
937
937
  case 0:
938
938
  _a = [__assign({}, output)];
939
939
  _c = {};
940
- return [4, parseBody(output.body, context)];
940
+ return [4, parseErrorBody(output.body, context)];
941
941
  case 1:
942
942
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
943
943
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1020,7 +1020,7 @@ var deserializeAws_restJson1BatchDisassociateScramSecretCommandError = function
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);
@@ -1106,7 +1106,7 @@ var deserializeAws_restJson1CreateClusterCommandError = function (output, contex
1106
1106
  case 0:
1107
1107
  _a = [__assign({}, output)];
1108
1108
  _c = {};
1109
- return [4, parseBody(output.body, context)];
1109
+ return [4, parseErrorBody(output.body, context)];
1110
1110
  case 1:
1111
1111
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1112
1112
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1195,7 +1195,7 @@ var deserializeAws_restJson1CreateClusterV2CommandError = function (output, cont
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);
@@ -1287,7 +1287,7 @@ var deserializeAws_restJson1CreateConfigurationCommandError = function (output,
1287
1287
  case 0:
1288
1288
  _a = [__assign({}, output)];
1289
1289
  _c = {};
1290
- return [4, parseBody(output.body, context)];
1290
+ return [4, parseErrorBody(output.body, context)];
1291
1291
  case 1:
1292
1292
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1293
1293
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1370,7 +1370,7 @@ var deserializeAws_restJson1DeleteClusterCommandError = function (output, contex
1370
1370
  case 0:
1371
1371
  _a = [__assign({}, output)];
1372
1372
  _c = {};
1373
- return [4, parseBody(output.body, context)];
1373
+ return [4, parseErrorBody(output.body, context)];
1374
1374
  case 1:
1375
1375
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1376
1376
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1441,7 +1441,7 @@ var deserializeAws_restJson1DeleteConfigurationCommandError = function (output,
1441
1441
  case 0:
1442
1442
  _a = [__assign({}, output)];
1443
1443
  _c = {};
1444
- return [4, parseBody(output.body, context)];
1444
+ return [4, parseErrorBody(output.body, context)];
1445
1445
  case 1:
1446
1446
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1447
1447
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1509,7 +1509,7 @@ var deserializeAws_restJson1DescribeClusterCommandError = function (output, cont
1509
1509
  case 0:
1510
1510
  _a = [__assign({}, output)];
1511
1511
  _c = {};
1512
- return [4, parseBody(output.body, context)];
1512
+ return [4, parseErrorBody(output.body, context)];
1513
1513
  case 1:
1514
1514
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1515
1515
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1581,7 +1581,7 @@ var deserializeAws_restJson1DescribeClusterOperationCommandError = function (out
1581
1581
  case 0:
1582
1582
  _a = [__assign({}, output)];
1583
1583
  _c = {};
1584
- return [4, parseBody(output.body, context)];
1584
+ return [4, parseErrorBody(output.body, context)];
1585
1585
  case 1:
1586
1586
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1587
1587
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1653,7 +1653,7 @@ var deserializeAws_restJson1DescribeClusterV2CommandError = function (output, co
1653
1653
  case 0:
1654
1654
  _a = [__assign({}, output)];
1655
1655
  _c = {};
1656
- return [4, parseBody(output.body, context)];
1656
+ return [4, parseErrorBody(output.body, context)];
1657
1657
  case 1:
1658
1658
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1659
1659
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1743,7 +1743,7 @@ var deserializeAws_restJson1DescribeConfigurationCommandError = function (output
1743
1743
  case 0:
1744
1744
  _a = [__assign({}, output)];
1745
1745
  _c = {};
1746
- return [4, parseBody(output.body, context)];
1746
+ return [4, parseErrorBody(output.body, context)];
1747
1747
  case 1:
1748
1748
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1749
1749
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1831,7 +1831,7 @@ var deserializeAws_restJson1DescribeConfigurationRevisionCommandError = function
1831
1831
  case 0:
1832
1832
  _a = [__assign({}, output)];
1833
1833
  _c = {};
1834
- return [4, parseBody(output.body, context)];
1834
+ return [4, parseErrorBody(output.body, context)];
1835
1835
  case 1:
1836
1836
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1837
1837
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1925,7 +1925,7 @@ var deserializeAws_restJson1GetBootstrapBrokersCommandError = function (output,
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);
@@ -1997,7 +1997,7 @@ var deserializeAws_restJson1GetCompatibleKafkaVersionsCommandError = function (o
1997
1997
  case 0:
1998
1998
  _a = [__assign({}, output)];
1999
1999
  _c = {};
2000
- return [4, parseBody(output.body, context)];
2000
+ return [4, parseErrorBody(output.body, context)];
2001
2001
  case 1:
2002
2002
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2003
2003
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2080,7 +2080,7 @@ var deserializeAws_restJson1ListClusterOperationsCommandError = function (output
2080
2080
  case 0:
2081
2081
  _a = [__assign({}, output)];
2082
2082
  _c = {};
2083
- return [4, parseBody(output.body, context)];
2083
+ return [4, parseErrorBody(output.body, context)];
2084
2084
  case 1:
2085
2085
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2086
2086
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2151,7 +2151,7 @@ var deserializeAws_restJson1ListClustersCommandError = function (output, context
2151
2151
  case 0:
2152
2152
  _a = [__assign({}, output)];
2153
2153
  _c = {};
2154
- return [4, parseBody(output.body, context)];
2154
+ return [4, parseErrorBody(output.body, context)];
2155
2155
  case 1:
2156
2156
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2157
2157
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2222,7 +2222,7 @@ var deserializeAws_restJson1ListClustersV2CommandError = function (output, conte
2222
2222
  case 0:
2223
2223
  _a = [__assign({}, output)];
2224
2224
  _c = {};
2225
- return [4, parseBody(output.body, context)];
2225
+ return [4, parseErrorBody(output.body, context)];
2226
2226
  case 1:
2227
2227
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2228
2228
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2293,7 +2293,7 @@ var deserializeAws_restJson1ListConfigurationRevisionsCommandError = function (o
2293
2293
  case 0:
2294
2294
  _a = [__assign({}, output)];
2295
2295
  _c = {};
2296
- return [4, parseBody(output.body, context)];
2296
+ return [4, parseErrorBody(output.body, context)];
2297
2297
  case 1:
2298
2298
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2299
2299
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2372,7 +2372,7 @@ var deserializeAws_restJson1ListConfigurationsCommandError = function (output, c
2372
2372
  case 0:
2373
2373
  _a = [__assign({}, output)];
2374
2374
  _c = {};
2375
- return [4, parseBody(output.body, context)];
2375
+ return [4, parseErrorBody(output.body, context)];
2376
2376
  case 1:
2377
2377
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2378
2378
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2447,7 +2447,7 @@ var deserializeAws_restJson1ListKafkaVersionsCommandError = function (output, co
2447
2447
  case 0:
2448
2448
  _a = [__assign({}, output)];
2449
2449
  _c = {};
2450
- return [4, parseBody(output.body, context)];
2450
+ return [4, parseErrorBody(output.body, context)];
2451
2451
  case 1:
2452
2452
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2453
2453
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2518,7 +2518,7 @@ var deserializeAws_restJson1ListNodesCommandError = function (output, context) {
2518
2518
  case 0:
2519
2519
  _a = [__assign({}, output)];
2520
2520
  _c = {};
2521
- return [4, parseBody(output.body, context)];
2521
+ return [4, parseErrorBody(output.body, context)];
2522
2522
  case 1:
2523
2523
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2524
2524
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2589,7 +2589,7 @@ var deserializeAws_restJson1ListScramSecretsCommandError = function (output, con
2589
2589
  case 0:
2590
2590
  _a = [__assign({}, output)];
2591
2591
  _c = {};
2592
- return [4, parseBody(output.body, context)];
2592
+ return [4, parseErrorBody(output.body, context)];
2593
2593
  case 1:
2594
2594
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2595
2595
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2669,7 +2669,7 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
2669
2669
  case 0:
2670
2670
  _a = [__assign({}, output)];
2671
2671
  _c = {};
2672
- return [4, parseBody(output.body, context)];
2672
+ return [4, parseErrorBody(output.body, context)];
2673
2673
  case 1:
2674
2674
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2675
2675
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2736,7 +2736,7 @@ var deserializeAws_restJson1RebootBrokerCommandError = function (output, context
2736
2736
  case 0:
2737
2737
  _a = [__assign({}, output)];
2738
2738
  _c = {};
2739
- return [4, parseBody(output.body, context)];
2739
+ return [4, parseErrorBody(output.body, context)];
2740
2740
  case 1:
2741
2741
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2742
2742
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2811,7 +2811,7 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
2811
2811
  case 0:
2812
2812
  _a = [__assign({}, output)];
2813
2813
  _c = {};
2814
- return [4, parseBody(output.body, context)];
2814
+ return [4, parseErrorBody(output.body, context)];
2815
2815
  case 1:
2816
2816
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2817
2817
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2870,7 +2870,7 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
2870
2870
  case 0:
2871
2871
  _a = [__assign({}, output)];
2872
2872
  _c = {};
2873
- return [4, parseBody(output.body, context)];
2873
+ return [4, parseErrorBody(output.body, context)];
2874
2874
  case 1:
2875
2875
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2876
2876
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2937,7 +2937,7 @@ var deserializeAws_restJson1UpdateBrokerCountCommandError = function (output, co
2937
2937
  case 0:
2938
2938
  _a = [__assign({}, output)];
2939
2939
  _c = {};
2940
- return [4, parseBody(output.body, context)];
2940
+ return [4, parseErrorBody(output.body, context)];
2941
2941
  case 1:
2942
2942
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2943
2943
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3012,7 +3012,7 @@ var deserializeAws_restJson1UpdateBrokerStorageCommandError = function (output,
3012
3012
  case 0:
3013
3013
  _a = [__assign({}, output)];
3014
3014
  _c = {};
3015
- return [4, parseBody(output.body, context)];
3015
+ return [4, parseErrorBody(output.body, context)];
3016
3016
  case 1:
3017
3017
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3018
3018
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3087,7 +3087,7 @@ var deserializeAws_restJson1UpdateBrokerTypeCommandError = function (output, con
3087
3087
  case 0:
3088
3088
  _a = [__assign({}, output)];
3089
3089
  _c = {};
3090
- return [4, parseBody(output.body, context)];
3090
+ return [4, parseErrorBody(output.body, context)];
3091
3091
  case 1:
3092
3092
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3093
3093
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3170,7 +3170,7 @@ var deserializeAws_restJson1UpdateClusterConfigurationCommandError = function (o
3170
3170
  case 0:
3171
3171
  _a = [__assign({}, output)];
3172
3172
  _c = {};
3173
- return [4, parseBody(output.body, context)];
3173
+ return [4, parseErrorBody(output.body, context)];
3174
3174
  case 1:
3175
3175
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3176
3176
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3249,7 +3249,7 @@ var deserializeAws_restJson1UpdateClusterKafkaVersionCommandError = function (ou
3249
3249
  case 0:
3250
3250
  _a = [__assign({}, output)];
3251
3251
  _c = {};
3252
- return [4, parseBody(output.body, context)];
3252
+ return [4, parseErrorBody(output.body, context)];
3253
3253
  case 1:
3254
3254
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3255
3255
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3332,7 +3332,7 @@ var deserializeAws_restJson1UpdateConfigurationCommandError = function (output,
3332
3332
  case 0:
3333
3333
  _a = [__assign({}, output)];
3334
3334
  _c = {};
3335
- return [4, parseBody(output.body, context)];
3335
+ return [4, parseErrorBody(output.body, context)];
3336
3336
  case 1:
3337
3337
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3338
3338
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3411,7 +3411,7 @@ var deserializeAws_restJson1UpdateConnectivityCommandError = function (output, c
3411
3411
  case 0:
3412
3412
  _a = [__assign({}, output)];
3413
3413
  _c = {};
3414
- return [4, parseBody(output.body, context)];
3414
+ return [4, parseErrorBody(output.body, context)];
3415
3415
  case 1:
3416
3416
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3417
3417
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3490,7 +3490,7 @@ var deserializeAws_restJson1UpdateMonitoringCommandError = function (output, con
3490
3490
  case 0:
3491
3491
  _a = [__assign({}, output)];
3492
3492
  _c = {};
3493
- return [4, parseBody(output.body, context)];
3493
+ return [4, parseErrorBody(output.body, context)];
3494
3494
  case 1:
3495
3495
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3496
3496
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3565,7 +3565,7 @@ var deserializeAws_restJson1UpdateSecurityCommandError = function (output, conte
3565
3565
  case 0:
3566
3566
  _a = [__assign({}, output)];
3567
3567
  _c = {};
3568
- return [4, parseBody(output.body, context)];
3568
+ return [4, parseErrorBody(output.body, context)];
3569
3569
  case 1:
3570
3570
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3571
3571
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4537,6 +4537,19 @@ var parseBody = function (streamBody, context) {
4537
4537
  return {};
4538
4538
  });
4539
4539
  };
4540
+ var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
4541
+ var value;
4542
+ var _a;
4543
+ return __generator(this, function (_b) {
4544
+ switch (_b.label) {
4545
+ case 0: return [4, parseBody(errorBody, context)];
4546
+ case 1:
4547
+ value = _b.sent();
4548
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
4549
+ return [2, value];
4550
+ }
4551
+ });
4552
+ }); };
4540
4553
  var loadRestJsonErrorCode = function (output, data) {
4541
4554
  var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
4542
4555
  var sanitizeErrorCode = function (rawValue) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-kafka",
3
3
  "description": "AWS SDK for JavaScript Kafka 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",