@aws-sdk/client-kafka 3.118.1 → 3.121.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 +11 -0
- package/dist-cjs/protocols/Aws_restJson1.js +175 -141
- package/dist-es/protocols/Aws_restJson1.js +175 -141
- package/package.json +3 -3
|
@@ -1108,8 +1108,7 @@ const deserializeAws_restJson1BatchAssociateScramSecretCommandError = async (out
|
|
|
1108
1108
|
body: await parseBody(output.body, context),
|
|
1109
1109
|
};
|
|
1110
1110
|
let response;
|
|
1111
|
-
|
|
1112
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1111
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1113
1112
|
switch (errorCode) {
|
|
1114
1113
|
case "BadRequestException":
|
|
1115
1114
|
case "com.amazonaws.kafka#BadRequestException":
|
|
@@ -1134,10 +1133,12 @@ const deserializeAws_restJson1BatchAssociateScramSecretCommandError = async (out
|
|
|
1134
1133
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
1135
1134
|
default:
|
|
1136
1135
|
const parsedBody = parsedOutput.body;
|
|
1136
|
+
const $metadata = deserializeMetadata(output);
|
|
1137
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1137
1138
|
response = new KafkaServiceException_1.KafkaServiceException({
|
|
1138
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1139
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1139
1140
|
$fault: "client",
|
|
1140
|
-
$metadata
|
|
1141
|
+
$metadata,
|
|
1141
1142
|
});
|
|
1142
1143
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1143
1144
|
}
|
|
@@ -1167,8 +1168,7 @@ const deserializeAws_restJson1BatchDisassociateScramSecretCommandError = async (
|
|
|
1167
1168
|
body: await parseBody(output.body, context),
|
|
1168
1169
|
};
|
|
1169
1170
|
let response;
|
|
1170
|
-
|
|
1171
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1171
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1172
1172
|
switch (errorCode) {
|
|
1173
1173
|
case "BadRequestException":
|
|
1174
1174
|
case "com.amazonaws.kafka#BadRequestException":
|
|
@@ -1193,10 +1193,12 @@ const deserializeAws_restJson1BatchDisassociateScramSecretCommandError = async (
|
|
|
1193
1193
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
1194
1194
|
default:
|
|
1195
1195
|
const parsedBody = parsedOutput.body;
|
|
1196
|
+
const $metadata = deserializeMetadata(output);
|
|
1197
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1196
1198
|
response = new KafkaServiceException_1.KafkaServiceException({
|
|
1197
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1199
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1198
1200
|
$fault: "client",
|
|
1199
|
-
$metadata
|
|
1201
|
+
$metadata,
|
|
1200
1202
|
});
|
|
1201
1203
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1202
1204
|
}
|
|
@@ -1230,8 +1232,7 @@ const deserializeAws_restJson1CreateClusterCommandError = async (output, context
|
|
|
1230
1232
|
body: await parseBody(output.body, context),
|
|
1231
1233
|
};
|
|
1232
1234
|
let response;
|
|
1233
|
-
|
|
1234
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1235
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1235
1236
|
switch (errorCode) {
|
|
1236
1237
|
case "BadRequestException":
|
|
1237
1238
|
case "com.amazonaws.kafka#BadRequestException":
|
|
@@ -1256,10 +1257,12 @@ const deserializeAws_restJson1CreateClusterCommandError = async (output, context
|
|
|
1256
1257
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
1257
1258
|
default:
|
|
1258
1259
|
const parsedBody = parsedOutput.body;
|
|
1260
|
+
const $metadata = deserializeMetadata(output);
|
|
1261
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1259
1262
|
response = new KafkaServiceException_1.KafkaServiceException({
|
|
1260
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1263
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1261
1264
|
$fault: "client",
|
|
1262
|
-
$metadata
|
|
1265
|
+
$metadata,
|
|
1263
1266
|
});
|
|
1264
1267
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1265
1268
|
}
|
|
@@ -1297,8 +1300,7 @@ const deserializeAws_restJson1CreateClusterV2CommandError = async (output, conte
|
|
|
1297
1300
|
body: await parseBody(output.body, context),
|
|
1298
1301
|
};
|
|
1299
1302
|
let response;
|
|
1300
|
-
|
|
1301
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1303
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1302
1304
|
switch (errorCode) {
|
|
1303
1305
|
case "BadRequestException":
|
|
1304
1306
|
case "com.amazonaws.kafka#BadRequestException":
|
|
@@ -1323,10 +1325,12 @@ const deserializeAws_restJson1CreateClusterV2CommandError = async (output, conte
|
|
|
1323
1325
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
1324
1326
|
default:
|
|
1325
1327
|
const parsedBody = parsedOutput.body;
|
|
1328
|
+
const $metadata = deserializeMetadata(output);
|
|
1329
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1326
1330
|
response = new KafkaServiceException_1.KafkaServiceException({
|
|
1327
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1331
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1328
1332
|
$fault: "client",
|
|
1329
|
-
$metadata
|
|
1333
|
+
$metadata,
|
|
1330
1334
|
});
|
|
1331
1335
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1332
1336
|
}
|
|
@@ -1368,8 +1372,7 @@ const deserializeAws_restJson1CreateConfigurationCommandError = async (output, c
|
|
|
1368
1372
|
body: await parseBody(output.body, context),
|
|
1369
1373
|
};
|
|
1370
1374
|
let response;
|
|
1371
|
-
|
|
1372
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1375
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1373
1376
|
switch (errorCode) {
|
|
1374
1377
|
case "BadRequestException":
|
|
1375
1378
|
case "com.amazonaws.kafka#BadRequestException":
|
|
@@ -1394,10 +1397,12 @@ const deserializeAws_restJson1CreateConfigurationCommandError = async (output, c
|
|
|
1394
1397
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
1395
1398
|
default:
|
|
1396
1399
|
const parsedBody = parsedOutput.body;
|
|
1400
|
+
const $metadata = deserializeMetadata(output);
|
|
1401
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1397
1402
|
response = new KafkaServiceException_1.KafkaServiceException({
|
|
1398
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1403
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1399
1404
|
$fault: "client",
|
|
1400
|
-
$metadata
|
|
1405
|
+
$metadata,
|
|
1401
1406
|
});
|
|
1402
1407
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1403
1408
|
}
|
|
@@ -1427,8 +1432,7 @@ const deserializeAws_restJson1DeleteClusterCommandError = async (output, context
|
|
|
1427
1432
|
body: await parseBody(output.body, context),
|
|
1428
1433
|
};
|
|
1429
1434
|
let response;
|
|
1430
|
-
|
|
1431
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1435
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1432
1436
|
switch (errorCode) {
|
|
1433
1437
|
case "BadRequestException":
|
|
1434
1438
|
case "com.amazonaws.kafka#BadRequestException":
|
|
@@ -1444,10 +1448,12 @@ const deserializeAws_restJson1DeleteClusterCommandError = async (output, context
|
|
|
1444
1448
|
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
1445
1449
|
default:
|
|
1446
1450
|
const parsedBody = parsedOutput.body;
|
|
1451
|
+
const $metadata = deserializeMetadata(output);
|
|
1452
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1447
1453
|
response = new KafkaServiceException_1.KafkaServiceException({
|
|
1448
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1454
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1449
1455
|
$fault: "client",
|
|
1450
|
-
$metadata
|
|
1456
|
+
$metadata,
|
|
1451
1457
|
});
|
|
1452
1458
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1453
1459
|
}
|
|
@@ -1477,8 +1483,7 @@ const deserializeAws_restJson1DeleteConfigurationCommandError = async (output, c
|
|
|
1477
1483
|
body: await parseBody(output.body, context),
|
|
1478
1484
|
};
|
|
1479
1485
|
let response;
|
|
1480
|
-
|
|
1481
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1486
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1482
1487
|
switch (errorCode) {
|
|
1483
1488
|
case "BadRequestException":
|
|
1484
1489
|
case "com.amazonaws.kafka#BadRequestException":
|
|
@@ -1494,10 +1499,12 @@ const deserializeAws_restJson1DeleteConfigurationCommandError = async (output, c
|
|
|
1494
1499
|
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
1495
1500
|
default:
|
|
1496
1501
|
const parsedBody = parsedOutput.body;
|
|
1502
|
+
const $metadata = deserializeMetadata(output);
|
|
1503
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1497
1504
|
response = new KafkaServiceException_1.KafkaServiceException({
|
|
1498
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1505
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1499
1506
|
$fault: "client",
|
|
1500
|
-
$metadata
|
|
1507
|
+
$metadata,
|
|
1501
1508
|
});
|
|
1502
1509
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1503
1510
|
}
|
|
@@ -1523,8 +1530,7 @@ const deserializeAws_restJson1DescribeClusterCommandError = async (output, conte
|
|
|
1523
1530
|
body: await parseBody(output.body, context),
|
|
1524
1531
|
};
|
|
1525
1532
|
let response;
|
|
1526
|
-
|
|
1527
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1533
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1528
1534
|
switch (errorCode) {
|
|
1529
1535
|
case "BadRequestException":
|
|
1530
1536
|
case "com.amazonaws.kafka#BadRequestException":
|
|
@@ -1543,10 +1549,12 @@ const deserializeAws_restJson1DescribeClusterCommandError = async (output, conte
|
|
|
1543
1549
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
1544
1550
|
default:
|
|
1545
1551
|
const parsedBody = parsedOutput.body;
|
|
1552
|
+
const $metadata = deserializeMetadata(output);
|
|
1553
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1546
1554
|
response = new KafkaServiceException_1.KafkaServiceException({
|
|
1547
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1555
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1548
1556
|
$fault: "client",
|
|
1549
|
-
$metadata
|
|
1557
|
+
$metadata,
|
|
1550
1558
|
});
|
|
1551
1559
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1552
1560
|
}
|
|
@@ -1572,8 +1580,7 @@ const deserializeAws_restJson1DescribeClusterOperationCommandError = async (outp
|
|
|
1572
1580
|
body: await parseBody(output.body, context),
|
|
1573
1581
|
};
|
|
1574
1582
|
let response;
|
|
1575
|
-
|
|
1576
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1583
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1577
1584
|
switch (errorCode) {
|
|
1578
1585
|
case "BadRequestException":
|
|
1579
1586
|
case "com.amazonaws.kafka#BadRequestException":
|
|
@@ -1592,10 +1599,12 @@ const deserializeAws_restJson1DescribeClusterOperationCommandError = async (outp
|
|
|
1592
1599
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
1593
1600
|
default:
|
|
1594
1601
|
const parsedBody = parsedOutput.body;
|
|
1602
|
+
const $metadata = deserializeMetadata(output);
|
|
1603
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1595
1604
|
response = new KafkaServiceException_1.KafkaServiceException({
|
|
1596
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1605
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1597
1606
|
$fault: "client",
|
|
1598
|
-
$metadata
|
|
1607
|
+
$metadata,
|
|
1599
1608
|
});
|
|
1600
1609
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1601
1610
|
}
|
|
@@ -1621,8 +1630,7 @@ const deserializeAws_restJson1DescribeClusterV2CommandError = async (output, con
|
|
|
1621
1630
|
body: await parseBody(output.body, context),
|
|
1622
1631
|
};
|
|
1623
1632
|
let response;
|
|
1624
|
-
|
|
1625
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1633
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1626
1634
|
switch (errorCode) {
|
|
1627
1635
|
case "BadRequestException":
|
|
1628
1636
|
case "com.amazonaws.kafka#BadRequestException":
|
|
@@ -1641,10 +1649,12 @@ const deserializeAws_restJson1DescribeClusterV2CommandError = async (output, con
|
|
|
1641
1649
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
1642
1650
|
default:
|
|
1643
1651
|
const parsedBody = parsedOutput.body;
|
|
1652
|
+
const $metadata = deserializeMetadata(output);
|
|
1653
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1644
1654
|
response = new KafkaServiceException_1.KafkaServiceException({
|
|
1645
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1655
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1646
1656
|
$fault: "client",
|
|
1647
|
-
$metadata
|
|
1657
|
+
$metadata,
|
|
1648
1658
|
});
|
|
1649
1659
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1650
1660
|
}
|
|
@@ -1694,8 +1704,7 @@ const deserializeAws_restJson1DescribeConfigurationCommandError = async (output,
|
|
|
1694
1704
|
body: await parseBody(output.body, context),
|
|
1695
1705
|
};
|
|
1696
1706
|
let response;
|
|
1697
|
-
|
|
1698
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1707
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1699
1708
|
switch (errorCode) {
|
|
1700
1709
|
case "BadRequestException":
|
|
1701
1710
|
case "com.amazonaws.kafka#BadRequestException":
|
|
@@ -1717,10 +1726,12 @@ const deserializeAws_restJson1DescribeConfigurationCommandError = async (output,
|
|
|
1717
1726
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
1718
1727
|
default:
|
|
1719
1728
|
const parsedBody = parsedOutput.body;
|
|
1729
|
+
const $metadata = deserializeMetadata(output);
|
|
1730
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1720
1731
|
response = new KafkaServiceException_1.KafkaServiceException({
|
|
1721
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1732
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1722
1733
|
$fault: "client",
|
|
1723
|
-
$metadata
|
|
1734
|
+
$metadata,
|
|
1724
1735
|
});
|
|
1725
1736
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1726
1737
|
}
|
|
@@ -1762,8 +1773,7 @@ const deserializeAws_restJson1DescribeConfigurationRevisionCommandError = async
|
|
|
1762
1773
|
body: await parseBody(output.body, context),
|
|
1763
1774
|
};
|
|
1764
1775
|
let response;
|
|
1765
|
-
|
|
1766
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1776
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1767
1777
|
switch (errorCode) {
|
|
1768
1778
|
case "BadRequestException":
|
|
1769
1779
|
case "com.amazonaws.kafka#BadRequestException":
|
|
@@ -1785,10 +1795,12 @@ const deserializeAws_restJson1DescribeConfigurationRevisionCommandError = async
|
|
|
1785
1795
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
1786
1796
|
default:
|
|
1787
1797
|
const parsedBody = parsedOutput.body;
|
|
1798
|
+
const $metadata = deserializeMetadata(output);
|
|
1799
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1788
1800
|
response = new KafkaServiceException_1.KafkaServiceException({
|
|
1789
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1801
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1790
1802
|
$fault: "client",
|
|
1791
|
-
$metadata
|
|
1803
|
+
$metadata,
|
|
1792
1804
|
});
|
|
1793
1805
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1794
1806
|
}
|
|
@@ -1838,8 +1850,7 @@ const deserializeAws_restJson1GetBootstrapBrokersCommandError = async (output, c
|
|
|
1838
1850
|
body: await parseBody(output.body, context),
|
|
1839
1851
|
};
|
|
1840
1852
|
let response;
|
|
1841
|
-
|
|
1842
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1853
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1843
1854
|
switch (errorCode) {
|
|
1844
1855
|
case "BadRequestException":
|
|
1845
1856
|
case "com.amazonaws.kafka#BadRequestException":
|
|
@@ -1858,10 +1869,12 @@ const deserializeAws_restJson1GetBootstrapBrokersCommandError = async (output, c
|
|
|
1858
1869
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
1859
1870
|
default:
|
|
1860
1871
|
const parsedBody = parsedOutput.body;
|
|
1872
|
+
const $metadata = deserializeMetadata(output);
|
|
1873
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1861
1874
|
response = new KafkaServiceException_1.KafkaServiceException({
|
|
1862
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1875
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1863
1876
|
$fault: "client",
|
|
1864
|
-
$metadata
|
|
1877
|
+
$metadata,
|
|
1865
1878
|
});
|
|
1866
1879
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1867
1880
|
}
|
|
@@ -1887,8 +1900,7 @@ const deserializeAws_restJson1GetCompatibleKafkaVersionsCommandError = async (ou
|
|
|
1887
1900
|
body: await parseBody(output.body, context),
|
|
1888
1901
|
};
|
|
1889
1902
|
let response;
|
|
1890
|
-
|
|
1891
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1903
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1892
1904
|
switch (errorCode) {
|
|
1893
1905
|
case "BadRequestException":
|
|
1894
1906
|
case "com.amazonaws.kafka#BadRequestException":
|
|
@@ -1913,10 +1925,12 @@ const deserializeAws_restJson1GetCompatibleKafkaVersionsCommandError = async (ou
|
|
|
1913
1925
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
1914
1926
|
default:
|
|
1915
1927
|
const parsedBody = parsedOutput.body;
|
|
1928
|
+
const $metadata = deserializeMetadata(output);
|
|
1929
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1916
1930
|
response = new KafkaServiceException_1.KafkaServiceException({
|
|
1917
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1931
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1918
1932
|
$fault: "client",
|
|
1919
|
-
$metadata
|
|
1933
|
+
$metadata,
|
|
1920
1934
|
});
|
|
1921
1935
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1922
1936
|
}
|
|
@@ -1946,8 +1960,7 @@ const deserializeAws_restJson1ListClusterOperationsCommandError = async (output,
|
|
|
1946
1960
|
body: await parseBody(output.body, context),
|
|
1947
1961
|
};
|
|
1948
1962
|
let response;
|
|
1949
|
-
|
|
1950
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1963
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1951
1964
|
switch (errorCode) {
|
|
1952
1965
|
case "BadRequestException":
|
|
1953
1966
|
case "com.amazonaws.kafka#BadRequestException":
|
|
@@ -1963,10 +1976,12 @@ const deserializeAws_restJson1ListClusterOperationsCommandError = async (output,
|
|
|
1963
1976
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
1964
1977
|
default:
|
|
1965
1978
|
const parsedBody = parsedOutput.body;
|
|
1979
|
+
const $metadata = deserializeMetadata(output);
|
|
1980
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1966
1981
|
response = new KafkaServiceException_1.KafkaServiceException({
|
|
1967
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1982
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1968
1983
|
$fault: "client",
|
|
1969
|
-
$metadata
|
|
1984
|
+
$metadata,
|
|
1970
1985
|
});
|
|
1971
1986
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1972
1987
|
}
|
|
@@ -1996,8 +2011,7 @@ const deserializeAws_restJson1ListClustersCommandError = async (output, context)
|
|
|
1996
2011
|
body: await parseBody(output.body, context),
|
|
1997
2012
|
};
|
|
1998
2013
|
let response;
|
|
1999
|
-
|
|
2000
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2014
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2001
2015
|
switch (errorCode) {
|
|
2002
2016
|
case "BadRequestException":
|
|
2003
2017
|
case "com.amazonaws.kafka#BadRequestException":
|
|
@@ -2013,10 +2027,12 @@ const deserializeAws_restJson1ListClustersCommandError = async (output, context)
|
|
|
2013
2027
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
2014
2028
|
default:
|
|
2015
2029
|
const parsedBody = parsedOutput.body;
|
|
2030
|
+
const $metadata = deserializeMetadata(output);
|
|
2031
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2016
2032
|
response = new KafkaServiceException_1.KafkaServiceException({
|
|
2017
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2033
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2018
2034
|
$fault: "client",
|
|
2019
|
-
$metadata
|
|
2035
|
+
$metadata,
|
|
2020
2036
|
});
|
|
2021
2037
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2022
2038
|
}
|
|
@@ -2046,8 +2062,7 @@ const deserializeAws_restJson1ListClustersV2CommandError = async (output, contex
|
|
|
2046
2062
|
body: await parseBody(output.body, context),
|
|
2047
2063
|
};
|
|
2048
2064
|
let response;
|
|
2049
|
-
|
|
2050
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2065
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2051
2066
|
switch (errorCode) {
|
|
2052
2067
|
case "BadRequestException":
|
|
2053
2068
|
case "com.amazonaws.kafka#BadRequestException":
|
|
@@ -2063,10 +2078,12 @@ const deserializeAws_restJson1ListClustersV2CommandError = async (output, contex
|
|
|
2063
2078
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
2064
2079
|
default:
|
|
2065
2080
|
const parsedBody = parsedOutput.body;
|
|
2081
|
+
const $metadata = deserializeMetadata(output);
|
|
2082
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2066
2083
|
response = new KafkaServiceException_1.KafkaServiceException({
|
|
2067
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2084
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2068
2085
|
$fault: "client",
|
|
2069
|
-
$metadata
|
|
2086
|
+
$metadata,
|
|
2070
2087
|
});
|
|
2071
2088
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2072
2089
|
}
|
|
@@ -2096,8 +2113,7 @@ const deserializeAws_restJson1ListConfigurationRevisionsCommandError = async (ou
|
|
|
2096
2113
|
body: await parseBody(output.body, context),
|
|
2097
2114
|
};
|
|
2098
2115
|
let response;
|
|
2099
|
-
|
|
2100
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2116
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2101
2117
|
switch (errorCode) {
|
|
2102
2118
|
case "BadRequestException":
|
|
2103
2119
|
case "com.amazonaws.kafka#BadRequestException":
|
|
@@ -2119,10 +2135,12 @@ const deserializeAws_restJson1ListConfigurationRevisionsCommandError = async (ou
|
|
|
2119
2135
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
2120
2136
|
default:
|
|
2121
2137
|
const parsedBody = parsedOutput.body;
|
|
2138
|
+
const $metadata = deserializeMetadata(output);
|
|
2139
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2122
2140
|
response = new KafkaServiceException_1.KafkaServiceException({
|
|
2123
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2141
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2124
2142
|
$fault: "client",
|
|
2125
|
-
$metadata
|
|
2143
|
+
$metadata,
|
|
2126
2144
|
});
|
|
2127
2145
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2128
2146
|
}
|
|
@@ -2152,8 +2170,7 @@ const deserializeAws_restJson1ListConfigurationsCommandError = async (output, co
|
|
|
2152
2170
|
body: await parseBody(output.body, context),
|
|
2153
2171
|
};
|
|
2154
2172
|
let response;
|
|
2155
|
-
|
|
2156
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2173
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2157
2174
|
switch (errorCode) {
|
|
2158
2175
|
case "BadRequestException":
|
|
2159
2176
|
case "com.amazonaws.kafka#BadRequestException":
|
|
@@ -2172,10 +2189,12 @@ const deserializeAws_restJson1ListConfigurationsCommandError = async (output, co
|
|
|
2172
2189
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
2173
2190
|
default:
|
|
2174
2191
|
const parsedBody = parsedOutput.body;
|
|
2192
|
+
const $metadata = deserializeMetadata(output);
|
|
2193
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2175
2194
|
response = new KafkaServiceException_1.KafkaServiceException({
|
|
2176
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2195
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2177
2196
|
$fault: "client",
|
|
2178
|
-
$metadata
|
|
2197
|
+
$metadata,
|
|
2179
2198
|
});
|
|
2180
2199
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2181
2200
|
}
|
|
@@ -2205,8 +2224,7 @@ const deserializeAws_restJson1ListKafkaVersionsCommandError = async (output, con
|
|
|
2205
2224
|
body: await parseBody(output.body, context),
|
|
2206
2225
|
};
|
|
2207
2226
|
let response;
|
|
2208
|
-
|
|
2209
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2227
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2210
2228
|
switch (errorCode) {
|
|
2211
2229
|
case "BadRequestException":
|
|
2212
2230
|
case "com.amazonaws.kafka#BadRequestException":
|
|
@@ -2222,10 +2240,12 @@ const deserializeAws_restJson1ListKafkaVersionsCommandError = async (output, con
|
|
|
2222
2240
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
2223
2241
|
default:
|
|
2224
2242
|
const parsedBody = parsedOutput.body;
|
|
2243
|
+
const $metadata = deserializeMetadata(output);
|
|
2244
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2225
2245
|
response = new KafkaServiceException_1.KafkaServiceException({
|
|
2226
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2246
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2227
2247
|
$fault: "client",
|
|
2228
|
-
$metadata
|
|
2248
|
+
$metadata,
|
|
2229
2249
|
});
|
|
2230
2250
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2231
2251
|
}
|
|
@@ -2255,8 +2275,7 @@ const deserializeAws_restJson1ListNodesCommandError = async (output, context) =>
|
|
|
2255
2275
|
body: await parseBody(output.body, context),
|
|
2256
2276
|
};
|
|
2257
2277
|
let response;
|
|
2258
|
-
|
|
2259
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2278
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2260
2279
|
switch (errorCode) {
|
|
2261
2280
|
case "BadRequestException":
|
|
2262
2281
|
case "com.amazonaws.kafka#BadRequestException":
|
|
@@ -2272,10 +2291,12 @@ const deserializeAws_restJson1ListNodesCommandError = async (output, context) =>
|
|
|
2272
2291
|
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
2273
2292
|
default:
|
|
2274
2293
|
const parsedBody = parsedOutput.body;
|
|
2294
|
+
const $metadata = deserializeMetadata(output);
|
|
2295
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2275
2296
|
response = new KafkaServiceException_1.KafkaServiceException({
|
|
2276
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2297
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2277
2298
|
$fault: "client",
|
|
2278
|
-
$metadata
|
|
2299
|
+
$metadata,
|
|
2279
2300
|
});
|
|
2280
2301
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2281
2302
|
}
|
|
@@ -2305,8 +2326,7 @@ const deserializeAws_restJson1ListScramSecretsCommandError = async (output, cont
|
|
|
2305
2326
|
body: await parseBody(output.body, context),
|
|
2306
2327
|
};
|
|
2307
2328
|
let response;
|
|
2308
|
-
|
|
2309
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2329
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2310
2330
|
switch (errorCode) {
|
|
2311
2331
|
case "BadRequestException":
|
|
2312
2332
|
case "com.amazonaws.kafka#BadRequestException":
|
|
@@ -2331,10 +2351,12 @@ const deserializeAws_restJson1ListScramSecretsCommandError = async (output, cont
|
|
|
2331
2351
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
2332
2352
|
default:
|
|
2333
2353
|
const parsedBody = parsedOutput.body;
|
|
2354
|
+
const $metadata = deserializeMetadata(output);
|
|
2355
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2334
2356
|
response = new KafkaServiceException_1.KafkaServiceException({
|
|
2335
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2357
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2336
2358
|
$fault: "client",
|
|
2337
|
-
$metadata
|
|
2359
|
+
$metadata,
|
|
2338
2360
|
});
|
|
2339
2361
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2340
2362
|
}
|
|
@@ -2360,8 +2382,7 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
2360
2382
|
body: await parseBody(output.body, context),
|
|
2361
2383
|
};
|
|
2362
2384
|
let response;
|
|
2363
|
-
|
|
2364
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2385
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2365
2386
|
switch (errorCode) {
|
|
2366
2387
|
case "BadRequestException":
|
|
2367
2388
|
case "com.amazonaws.kafka#BadRequestException":
|
|
@@ -2374,10 +2395,12 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
2374
2395
|
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
2375
2396
|
default:
|
|
2376
2397
|
const parsedBody = parsedOutput.body;
|
|
2398
|
+
const $metadata = deserializeMetadata(output);
|
|
2399
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2377
2400
|
response = new KafkaServiceException_1.KafkaServiceException({
|
|
2378
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2401
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2379
2402
|
$fault: "client",
|
|
2380
|
-
$metadata
|
|
2403
|
+
$metadata,
|
|
2381
2404
|
});
|
|
2382
2405
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2383
2406
|
}
|
|
@@ -2407,8 +2430,7 @@ const deserializeAws_restJson1RebootBrokerCommandError = async (output, context)
|
|
|
2407
2430
|
body: await parseBody(output.body, context),
|
|
2408
2431
|
};
|
|
2409
2432
|
let response;
|
|
2410
|
-
|
|
2411
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2433
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2412
2434
|
switch (errorCode) {
|
|
2413
2435
|
case "BadRequestException":
|
|
2414
2436
|
case "com.amazonaws.kafka#BadRequestException":
|
|
@@ -2433,10 +2455,12 @@ const deserializeAws_restJson1RebootBrokerCommandError = async (output, context)
|
|
|
2433
2455
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
2434
2456
|
default:
|
|
2435
2457
|
const parsedBody = parsedOutput.body;
|
|
2458
|
+
const $metadata = deserializeMetadata(output);
|
|
2459
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2436
2460
|
response = new KafkaServiceException_1.KafkaServiceException({
|
|
2437
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2461
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2438
2462
|
$fault: "client",
|
|
2439
|
-
$metadata
|
|
2463
|
+
$metadata,
|
|
2440
2464
|
});
|
|
2441
2465
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2442
2466
|
}
|
|
@@ -2458,8 +2482,7 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
2458
2482
|
body: await parseBody(output.body, context),
|
|
2459
2483
|
};
|
|
2460
2484
|
let response;
|
|
2461
|
-
|
|
2462
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2485
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2463
2486
|
switch (errorCode) {
|
|
2464
2487
|
case "BadRequestException":
|
|
2465
2488
|
case "com.amazonaws.kafka#BadRequestException":
|
|
@@ -2472,10 +2495,12 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
2472
2495
|
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
2473
2496
|
default:
|
|
2474
2497
|
const parsedBody = parsedOutput.body;
|
|
2498
|
+
const $metadata = deserializeMetadata(output);
|
|
2499
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2475
2500
|
response = new KafkaServiceException_1.KafkaServiceException({
|
|
2476
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2501
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2477
2502
|
$fault: "client",
|
|
2478
|
-
$metadata
|
|
2503
|
+
$metadata,
|
|
2479
2504
|
});
|
|
2480
2505
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2481
2506
|
}
|
|
@@ -2497,8 +2522,7 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
2497
2522
|
body: await parseBody(output.body, context),
|
|
2498
2523
|
};
|
|
2499
2524
|
let response;
|
|
2500
|
-
|
|
2501
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2525
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2502
2526
|
switch (errorCode) {
|
|
2503
2527
|
case "BadRequestException":
|
|
2504
2528
|
case "com.amazonaws.kafka#BadRequestException":
|
|
@@ -2511,10 +2535,12 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
2511
2535
|
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
2512
2536
|
default:
|
|
2513
2537
|
const parsedBody = parsedOutput.body;
|
|
2538
|
+
const $metadata = deserializeMetadata(output);
|
|
2539
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2514
2540
|
response = new KafkaServiceException_1.KafkaServiceException({
|
|
2515
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2541
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2516
2542
|
$fault: "client",
|
|
2517
|
-
$metadata
|
|
2543
|
+
$metadata,
|
|
2518
2544
|
});
|
|
2519
2545
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2520
2546
|
}
|
|
@@ -2544,8 +2570,7 @@ const deserializeAws_restJson1UpdateBrokerCountCommandError = async (output, con
|
|
|
2544
2570
|
body: await parseBody(output.body, context),
|
|
2545
2571
|
};
|
|
2546
2572
|
let response;
|
|
2547
|
-
|
|
2548
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2573
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2549
2574
|
switch (errorCode) {
|
|
2550
2575
|
case "BadRequestException":
|
|
2551
2576
|
case "com.amazonaws.kafka#BadRequestException":
|
|
@@ -2564,10 +2589,12 @@ const deserializeAws_restJson1UpdateBrokerCountCommandError = async (output, con
|
|
|
2564
2589
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
2565
2590
|
default:
|
|
2566
2591
|
const parsedBody = parsedOutput.body;
|
|
2592
|
+
const $metadata = deserializeMetadata(output);
|
|
2593
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2567
2594
|
response = new KafkaServiceException_1.KafkaServiceException({
|
|
2568
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2595
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2569
2596
|
$fault: "client",
|
|
2570
|
-
$metadata
|
|
2597
|
+
$metadata,
|
|
2571
2598
|
});
|
|
2572
2599
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2573
2600
|
}
|
|
@@ -2597,8 +2624,7 @@ const deserializeAws_restJson1UpdateBrokerStorageCommandError = async (output, c
|
|
|
2597
2624
|
body: await parseBody(output.body, context),
|
|
2598
2625
|
};
|
|
2599
2626
|
let response;
|
|
2600
|
-
|
|
2601
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2627
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2602
2628
|
switch (errorCode) {
|
|
2603
2629
|
case "BadRequestException":
|
|
2604
2630
|
case "com.amazonaws.kafka#BadRequestException":
|
|
@@ -2617,10 +2643,12 @@ const deserializeAws_restJson1UpdateBrokerStorageCommandError = async (output, c
|
|
|
2617
2643
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
2618
2644
|
default:
|
|
2619
2645
|
const parsedBody = parsedOutput.body;
|
|
2646
|
+
const $metadata = deserializeMetadata(output);
|
|
2647
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2620
2648
|
response = new KafkaServiceException_1.KafkaServiceException({
|
|
2621
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2649
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2622
2650
|
$fault: "client",
|
|
2623
|
-
$metadata
|
|
2651
|
+
$metadata,
|
|
2624
2652
|
});
|
|
2625
2653
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2626
2654
|
}
|
|
@@ -2650,8 +2678,7 @@ const deserializeAws_restJson1UpdateBrokerTypeCommandError = async (output, cont
|
|
|
2650
2678
|
body: await parseBody(output.body, context),
|
|
2651
2679
|
};
|
|
2652
2680
|
let response;
|
|
2653
|
-
|
|
2654
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2681
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2655
2682
|
switch (errorCode) {
|
|
2656
2683
|
case "BadRequestException":
|
|
2657
2684
|
case "com.amazonaws.kafka#BadRequestException":
|
|
@@ -2676,10 +2703,12 @@ const deserializeAws_restJson1UpdateBrokerTypeCommandError = async (output, cont
|
|
|
2676
2703
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
2677
2704
|
default:
|
|
2678
2705
|
const parsedBody = parsedOutput.body;
|
|
2706
|
+
const $metadata = deserializeMetadata(output);
|
|
2707
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2679
2708
|
response = new KafkaServiceException_1.KafkaServiceException({
|
|
2680
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2709
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2681
2710
|
$fault: "client",
|
|
2682
|
-
$metadata
|
|
2711
|
+
$metadata,
|
|
2683
2712
|
});
|
|
2684
2713
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2685
2714
|
}
|
|
@@ -2709,8 +2738,7 @@ const deserializeAws_restJson1UpdateClusterConfigurationCommandError = async (ou
|
|
|
2709
2738
|
body: await parseBody(output.body, context),
|
|
2710
2739
|
};
|
|
2711
2740
|
let response;
|
|
2712
|
-
|
|
2713
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2741
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2714
2742
|
switch (errorCode) {
|
|
2715
2743
|
case "BadRequestException":
|
|
2716
2744
|
case "com.amazonaws.kafka#BadRequestException":
|
|
@@ -2732,10 +2760,12 @@ const deserializeAws_restJson1UpdateClusterConfigurationCommandError = async (ou
|
|
|
2732
2760
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
2733
2761
|
default:
|
|
2734
2762
|
const parsedBody = parsedOutput.body;
|
|
2763
|
+
const $metadata = deserializeMetadata(output);
|
|
2764
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2735
2765
|
response = new KafkaServiceException_1.KafkaServiceException({
|
|
2736
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2766
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2737
2767
|
$fault: "client",
|
|
2738
|
-
$metadata
|
|
2768
|
+
$metadata,
|
|
2739
2769
|
});
|
|
2740
2770
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2741
2771
|
}
|
|
@@ -2765,8 +2795,7 @@ const deserializeAws_restJson1UpdateClusterKafkaVersionCommandError = async (out
|
|
|
2765
2795
|
body: await parseBody(output.body, context),
|
|
2766
2796
|
};
|
|
2767
2797
|
let response;
|
|
2768
|
-
|
|
2769
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2798
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2770
2799
|
switch (errorCode) {
|
|
2771
2800
|
case "BadRequestException":
|
|
2772
2801
|
case "com.amazonaws.kafka#BadRequestException":
|
|
@@ -2791,10 +2820,12 @@ const deserializeAws_restJson1UpdateClusterKafkaVersionCommandError = async (out
|
|
|
2791
2820
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
2792
2821
|
default:
|
|
2793
2822
|
const parsedBody = parsedOutput.body;
|
|
2823
|
+
const $metadata = deserializeMetadata(output);
|
|
2824
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2794
2825
|
response = new KafkaServiceException_1.KafkaServiceException({
|
|
2795
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2826
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2796
2827
|
$fault: "client",
|
|
2797
|
-
$metadata
|
|
2828
|
+
$metadata,
|
|
2798
2829
|
});
|
|
2799
2830
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2800
2831
|
}
|
|
@@ -2824,8 +2855,7 @@ const deserializeAws_restJson1UpdateConfigurationCommandError = async (output, c
|
|
|
2824
2855
|
body: await parseBody(output.body, context),
|
|
2825
2856
|
};
|
|
2826
2857
|
let response;
|
|
2827
|
-
|
|
2828
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2858
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2829
2859
|
switch (errorCode) {
|
|
2830
2860
|
case "BadRequestException":
|
|
2831
2861
|
case "com.amazonaws.kafka#BadRequestException":
|
|
@@ -2847,10 +2877,12 @@ const deserializeAws_restJson1UpdateConfigurationCommandError = async (output, c
|
|
|
2847
2877
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
2848
2878
|
default:
|
|
2849
2879
|
const parsedBody = parsedOutput.body;
|
|
2880
|
+
const $metadata = deserializeMetadata(output);
|
|
2881
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2850
2882
|
response = new KafkaServiceException_1.KafkaServiceException({
|
|
2851
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2883
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2852
2884
|
$fault: "client",
|
|
2853
|
-
$metadata
|
|
2885
|
+
$metadata,
|
|
2854
2886
|
});
|
|
2855
2887
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2856
2888
|
}
|
|
@@ -2880,8 +2912,7 @@ const deserializeAws_restJson1UpdateConnectivityCommandError = async (output, co
|
|
|
2880
2912
|
body: await parseBody(output.body, context),
|
|
2881
2913
|
};
|
|
2882
2914
|
let response;
|
|
2883
|
-
|
|
2884
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2915
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2885
2916
|
switch (errorCode) {
|
|
2886
2917
|
case "BadRequestException":
|
|
2887
2918
|
case "com.amazonaws.kafka#BadRequestException":
|
|
@@ -2903,10 +2934,12 @@ const deserializeAws_restJson1UpdateConnectivityCommandError = async (output, co
|
|
|
2903
2934
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
2904
2935
|
default:
|
|
2905
2936
|
const parsedBody = parsedOutput.body;
|
|
2937
|
+
const $metadata = deserializeMetadata(output);
|
|
2938
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2906
2939
|
response = new KafkaServiceException_1.KafkaServiceException({
|
|
2907
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2940
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2908
2941
|
$fault: "client",
|
|
2909
|
-
$metadata
|
|
2942
|
+
$metadata,
|
|
2910
2943
|
});
|
|
2911
2944
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2912
2945
|
}
|
|
@@ -2936,8 +2969,7 @@ const deserializeAws_restJson1UpdateMonitoringCommandError = async (output, cont
|
|
|
2936
2969
|
body: await parseBody(output.body, context),
|
|
2937
2970
|
};
|
|
2938
2971
|
let response;
|
|
2939
|
-
|
|
2940
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2972
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2941
2973
|
switch (errorCode) {
|
|
2942
2974
|
case "BadRequestException":
|
|
2943
2975
|
case "com.amazonaws.kafka#BadRequestException":
|
|
@@ -2956,10 +2988,12 @@ const deserializeAws_restJson1UpdateMonitoringCommandError = async (output, cont
|
|
|
2956
2988
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
2957
2989
|
default:
|
|
2958
2990
|
const parsedBody = parsedOutput.body;
|
|
2991
|
+
const $metadata = deserializeMetadata(output);
|
|
2992
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2959
2993
|
response = new KafkaServiceException_1.KafkaServiceException({
|
|
2960
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2994
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2961
2995
|
$fault: "client",
|
|
2962
|
-
$metadata
|
|
2996
|
+
$metadata,
|
|
2963
2997
|
});
|
|
2964
2998
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2965
2999
|
}
|
|
@@ -2989,8 +3023,7 @@ const deserializeAws_restJson1UpdateSecurityCommandError = async (output, contex
|
|
|
2989
3023
|
body: await parseBody(output.body, context),
|
|
2990
3024
|
};
|
|
2991
3025
|
let response;
|
|
2992
|
-
|
|
2993
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3026
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2994
3027
|
switch (errorCode) {
|
|
2995
3028
|
case "BadRequestException":
|
|
2996
3029
|
case "com.amazonaws.kafka#BadRequestException":
|
|
@@ -3015,10 +3048,12 @@ const deserializeAws_restJson1UpdateSecurityCommandError = async (output, contex
|
|
|
3015
3048
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
3016
3049
|
default:
|
|
3017
3050
|
const parsedBody = parsedOutput.body;
|
|
3051
|
+
const $metadata = deserializeMetadata(output);
|
|
3052
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3018
3053
|
response = new KafkaServiceException_1.KafkaServiceException({
|
|
3019
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3054
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3020
3055
|
$fault: "client",
|
|
3021
|
-
$metadata
|
|
3056
|
+
$metadata,
|
|
3022
3057
|
});
|
|
3023
3058
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3024
3059
|
}
|
|
@@ -4169,5 +4204,4 @@ const loadRestJsonErrorCode = (output, data) => {
|
|
|
4169
4204
|
if (data["__type"] !== undefined) {
|
|
4170
4205
|
return sanitizeErrorCode(data["__type"]);
|
|
4171
4206
|
}
|
|
4172
|
-
return "";
|
|
4173
4207
|
};
|