@aws-sdk/client-elasticsearch-service 3.112.0 → 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 +27 -0
- package/dist-cjs/protocols/Aws_restJson1.js +205 -165
- package/dist-es/protocols/Aws_restJson1.js +205 -165
- package/package.json +6 -6
|
@@ -1223,8 +1223,7 @@ const deserializeAws_restJson1AcceptInboundCrossClusterSearchConnectionCommandEr
|
|
|
1223
1223
|
body: await parseBody(output.body, context),
|
|
1224
1224
|
};
|
|
1225
1225
|
let response;
|
|
1226
|
-
|
|
1227
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1226
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1228
1227
|
switch (errorCode) {
|
|
1229
1228
|
case "DisabledOperationException":
|
|
1230
1229
|
case "com.amazonaws.elasticsearchservice#DisabledOperationException":
|
|
@@ -1237,10 +1236,12 @@ const deserializeAws_restJson1AcceptInboundCrossClusterSearchConnectionCommandEr
|
|
|
1237
1236
|
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1238
1237
|
default:
|
|
1239
1238
|
const parsedBody = parsedOutput.body;
|
|
1239
|
+
const $metadata = deserializeMetadata(output);
|
|
1240
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1240
1241
|
response = new ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException({
|
|
1241
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1242
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1242
1243
|
$fault: "client",
|
|
1243
|
-
$metadata
|
|
1244
|
+
$metadata,
|
|
1244
1245
|
});
|
|
1245
1246
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1246
1247
|
}
|
|
@@ -1262,8 +1263,7 @@ const deserializeAws_restJson1AddTagsCommandError = async (output, context) => {
|
|
|
1262
1263
|
body: await parseBody(output.body, context),
|
|
1263
1264
|
};
|
|
1264
1265
|
let response;
|
|
1265
|
-
|
|
1266
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1266
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1267
1267
|
switch (errorCode) {
|
|
1268
1268
|
case "BaseException":
|
|
1269
1269
|
case "com.amazonaws.elasticsearchservice#BaseException":
|
|
@@ -1279,10 +1279,12 @@ const deserializeAws_restJson1AddTagsCommandError = async (output, context) => {
|
|
|
1279
1279
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1280
1280
|
default:
|
|
1281
1281
|
const parsedBody = parsedOutput.body;
|
|
1282
|
+
const $metadata = deserializeMetadata(output);
|
|
1283
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1282
1284
|
response = new ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException({
|
|
1283
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1285
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1284
1286
|
$fault: "client",
|
|
1285
|
-
$metadata
|
|
1287
|
+
$metadata,
|
|
1286
1288
|
});
|
|
1287
1289
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1288
1290
|
}
|
|
@@ -1308,8 +1310,7 @@ const deserializeAws_restJson1AssociatePackageCommandError = async (output, cont
|
|
|
1308
1310
|
body: await parseBody(output.body, context),
|
|
1309
1311
|
};
|
|
1310
1312
|
let response;
|
|
1311
|
-
|
|
1312
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1313
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1313
1314
|
switch (errorCode) {
|
|
1314
1315
|
case "AccessDeniedException":
|
|
1315
1316
|
case "com.amazonaws.elasticsearchservice#AccessDeniedException":
|
|
@@ -1331,10 +1332,12 @@ const deserializeAws_restJson1AssociatePackageCommandError = async (output, cont
|
|
|
1331
1332
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1332
1333
|
default:
|
|
1333
1334
|
const parsedBody = parsedOutput.body;
|
|
1335
|
+
const $metadata = deserializeMetadata(output);
|
|
1336
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1334
1337
|
response = new ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException({
|
|
1335
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1338
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1336
1339
|
$fault: "client",
|
|
1337
|
-
$metadata
|
|
1340
|
+
$metadata,
|
|
1338
1341
|
});
|
|
1339
1342
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1340
1343
|
}
|
|
@@ -1360,8 +1363,7 @@ const deserializeAws_restJson1CancelElasticsearchServiceSoftwareUpdateCommandErr
|
|
|
1360
1363
|
body: await parseBody(output.body, context),
|
|
1361
1364
|
};
|
|
1362
1365
|
let response;
|
|
1363
|
-
|
|
1364
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1366
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1365
1367
|
switch (errorCode) {
|
|
1366
1368
|
case "BaseException":
|
|
1367
1369
|
case "com.amazonaws.elasticsearchservice#BaseException":
|
|
@@ -1377,10 +1379,12 @@ const deserializeAws_restJson1CancelElasticsearchServiceSoftwareUpdateCommandErr
|
|
|
1377
1379
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1378
1380
|
default:
|
|
1379
1381
|
const parsedBody = parsedOutput.body;
|
|
1382
|
+
const $metadata = deserializeMetadata(output);
|
|
1383
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1380
1384
|
response = new ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException({
|
|
1381
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1385
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1382
1386
|
$fault: "client",
|
|
1383
|
-
$metadata
|
|
1387
|
+
$metadata,
|
|
1384
1388
|
});
|
|
1385
1389
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1386
1390
|
}
|
|
@@ -1406,8 +1410,7 @@ const deserializeAws_restJson1CreateElasticsearchDomainCommandError = async (out
|
|
|
1406
1410
|
body: await parseBody(output.body, context),
|
|
1407
1411
|
};
|
|
1408
1412
|
let response;
|
|
1409
|
-
|
|
1410
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1413
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1411
1414
|
switch (errorCode) {
|
|
1412
1415
|
case "BaseException":
|
|
1413
1416
|
case "com.amazonaws.elasticsearchservice#BaseException":
|
|
@@ -1432,10 +1435,12 @@ const deserializeAws_restJson1CreateElasticsearchDomainCommandError = async (out
|
|
|
1432
1435
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1433
1436
|
default:
|
|
1434
1437
|
const parsedBody = parsedOutput.body;
|
|
1438
|
+
const $metadata = deserializeMetadata(output);
|
|
1439
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1435
1440
|
response = new ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException({
|
|
1436
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1441
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1437
1442
|
$fault: "client",
|
|
1438
|
-
$metadata
|
|
1443
|
+
$metadata,
|
|
1439
1444
|
});
|
|
1440
1445
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1441
1446
|
}
|
|
@@ -1477,8 +1482,7 @@ const deserializeAws_restJson1CreateOutboundCrossClusterSearchConnectionCommandE
|
|
|
1477
1482
|
body: await parseBody(output.body, context),
|
|
1478
1483
|
};
|
|
1479
1484
|
let response;
|
|
1480
|
-
|
|
1481
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1485
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1482
1486
|
switch (errorCode) {
|
|
1483
1487
|
case "DisabledOperationException":
|
|
1484
1488
|
case "com.amazonaws.elasticsearchservice#DisabledOperationException":
|
|
@@ -1494,10 +1498,12 @@ const deserializeAws_restJson1CreateOutboundCrossClusterSearchConnectionCommandE
|
|
|
1494
1498
|
throw await deserializeAws_restJson1ResourceAlreadyExistsExceptionResponse(parsedOutput, context);
|
|
1495
1499
|
default:
|
|
1496
1500
|
const parsedBody = parsedOutput.body;
|
|
1501
|
+
const $metadata = deserializeMetadata(output);
|
|
1502
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1497
1503
|
response = new ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException({
|
|
1498
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1504
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1499
1505
|
$fault: "client",
|
|
1500
|
-
$metadata
|
|
1506
|
+
$metadata,
|
|
1501
1507
|
});
|
|
1502
1508
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1503
1509
|
}
|
|
@@ -1523,8 +1529,7 @@ const deserializeAws_restJson1CreatePackageCommandError = async (output, context
|
|
|
1523
1529
|
body: await parseBody(output.body, context),
|
|
1524
1530
|
};
|
|
1525
1531
|
let response;
|
|
1526
|
-
|
|
1527
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1532
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1528
1533
|
switch (errorCode) {
|
|
1529
1534
|
case "AccessDeniedException":
|
|
1530
1535
|
case "com.amazonaws.elasticsearchservice#AccessDeniedException":
|
|
@@ -1549,10 +1554,12 @@ const deserializeAws_restJson1CreatePackageCommandError = async (output, context
|
|
|
1549
1554
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1550
1555
|
default:
|
|
1551
1556
|
const parsedBody = parsedOutput.body;
|
|
1557
|
+
const $metadata = deserializeMetadata(output);
|
|
1558
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1552
1559
|
response = new ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException({
|
|
1553
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1560
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1554
1561
|
$fault: "client",
|
|
1555
|
-
$metadata
|
|
1562
|
+
$metadata,
|
|
1556
1563
|
});
|
|
1557
1564
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1558
1565
|
}
|
|
@@ -1578,8 +1585,7 @@ const deserializeAws_restJson1DeleteElasticsearchDomainCommandError = async (out
|
|
|
1578
1585
|
body: await parseBody(output.body, context),
|
|
1579
1586
|
};
|
|
1580
1587
|
let response;
|
|
1581
|
-
|
|
1582
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1588
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1583
1589
|
switch (errorCode) {
|
|
1584
1590
|
case "BaseException":
|
|
1585
1591
|
case "com.amazonaws.elasticsearchservice#BaseException":
|
|
@@ -1595,10 +1601,12 @@ const deserializeAws_restJson1DeleteElasticsearchDomainCommandError = async (out
|
|
|
1595
1601
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1596
1602
|
default:
|
|
1597
1603
|
const parsedBody = parsedOutput.body;
|
|
1604
|
+
const $metadata = deserializeMetadata(output);
|
|
1605
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1598
1606
|
response = new ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException({
|
|
1599
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1607
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1600
1608
|
$fault: "client",
|
|
1601
|
-
$metadata
|
|
1609
|
+
$metadata,
|
|
1602
1610
|
});
|
|
1603
1611
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1604
1612
|
}
|
|
@@ -1620,8 +1628,7 @@ const deserializeAws_restJson1DeleteElasticsearchServiceRoleCommandError = async
|
|
|
1620
1628
|
body: await parseBody(output.body, context),
|
|
1621
1629
|
};
|
|
1622
1630
|
let response;
|
|
1623
|
-
|
|
1624
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1631
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1625
1632
|
switch (errorCode) {
|
|
1626
1633
|
case "BaseException":
|
|
1627
1634
|
case "com.amazonaws.elasticsearchservice#BaseException":
|
|
@@ -1634,10 +1641,12 @@ const deserializeAws_restJson1DeleteElasticsearchServiceRoleCommandError = async
|
|
|
1634
1641
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1635
1642
|
default:
|
|
1636
1643
|
const parsedBody = parsedOutput.body;
|
|
1644
|
+
const $metadata = deserializeMetadata(output);
|
|
1645
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1637
1646
|
response = new ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException({
|
|
1638
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1647
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1639
1648
|
$fault: "client",
|
|
1640
|
-
$metadata
|
|
1649
|
+
$metadata,
|
|
1641
1650
|
});
|
|
1642
1651
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1643
1652
|
}
|
|
@@ -1663,8 +1672,7 @@ const deserializeAws_restJson1DeleteInboundCrossClusterSearchConnectionCommandEr
|
|
|
1663
1672
|
body: await parseBody(output.body, context),
|
|
1664
1673
|
};
|
|
1665
1674
|
let response;
|
|
1666
|
-
|
|
1667
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1675
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1668
1676
|
switch (errorCode) {
|
|
1669
1677
|
case "DisabledOperationException":
|
|
1670
1678
|
case "com.amazonaws.elasticsearchservice#DisabledOperationException":
|
|
@@ -1674,10 +1682,12 @@ const deserializeAws_restJson1DeleteInboundCrossClusterSearchConnectionCommandEr
|
|
|
1674
1682
|
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1675
1683
|
default:
|
|
1676
1684
|
const parsedBody = parsedOutput.body;
|
|
1685
|
+
const $metadata = deserializeMetadata(output);
|
|
1686
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1677
1687
|
response = new ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException({
|
|
1678
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1688
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1679
1689
|
$fault: "client",
|
|
1680
|
-
$metadata
|
|
1690
|
+
$metadata,
|
|
1681
1691
|
});
|
|
1682
1692
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1683
1693
|
}
|
|
@@ -1703,8 +1713,7 @@ const deserializeAws_restJson1DeleteOutboundCrossClusterSearchConnectionCommandE
|
|
|
1703
1713
|
body: await parseBody(output.body, context),
|
|
1704
1714
|
};
|
|
1705
1715
|
let response;
|
|
1706
|
-
|
|
1707
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1716
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1708
1717
|
switch (errorCode) {
|
|
1709
1718
|
case "DisabledOperationException":
|
|
1710
1719
|
case "com.amazonaws.elasticsearchservice#DisabledOperationException":
|
|
@@ -1714,10 +1723,12 @@ const deserializeAws_restJson1DeleteOutboundCrossClusterSearchConnectionCommandE
|
|
|
1714
1723
|
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1715
1724
|
default:
|
|
1716
1725
|
const parsedBody = parsedOutput.body;
|
|
1726
|
+
const $metadata = deserializeMetadata(output);
|
|
1727
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1717
1728
|
response = new ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException({
|
|
1718
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1729
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1719
1730
|
$fault: "client",
|
|
1720
|
-
$metadata
|
|
1731
|
+
$metadata,
|
|
1721
1732
|
});
|
|
1722
1733
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1723
1734
|
}
|
|
@@ -1743,8 +1754,7 @@ const deserializeAws_restJson1DeletePackageCommandError = async (output, context
|
|
|
1743
1754
|
body: await parseBody(output.body, context),
|
|
1744
1755
|
};
|
|
1745
1756
|
let response;
|
|
1746
|
-
|
|
1747
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1757
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1748
1758
|
switch (errorCode) {
|
|
1749
1759
|
case "AccessDeniedException":
|
|
1750
1760
|
case "com.amazonaws.elasticsearchservice#AccessDeniedException":
|
|
@@ -1766,10 +1776,12 @@ const deserializeAws_restJson1DeletePackageCommandError = async (output, context
|
|
|
1766
1776
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1767
1777
|
default:
|
|
1768
1778
|
const parsedBody = parsedOutput.body;
|
|
1779
|
+
const $metadata = deserializeMetadata(output);
|
|
1780
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1769
1781
|
response = new ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException({
|
|
1770
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1782
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1771
1783
|
$fault: "client",
|
|
1772
|
-
$metadata
|
|
1784
|
+
$metadata,
|
|
1773
1785
|
});
|
|
1774
1786
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1775
1787
|
}
|
|
@@ -1799,8 +1811,7 @@ const deserializeAws_restJson1DescribeDomainAutoTunesCommandError = async (outpu
|
|
|
1799
1811
|
body: await parseBody(output.body, context),
|
|
1800
1812
|
};
|
|
1801
1813
|
let response;
|
|
1802
|
-
|
|
1803
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1814
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1804
1815
|
switch (errorCode) {
|
|
1805
1816
|
case "BaseException":
|
|
1806
1817
|
case "com.amazonaws.elasticsearchservice#BaseException":
|
|
@@ -1816,10 +1827,12 @@ const deserializeAws_restJson1DescribeDomainAutoTunesCommandError = async (outpu
|
|
|
1816
1827
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1817
1828
|
default:
|
|
1818
1829
|
const parsedBody = parsedOutput.body;
|
|
1830
|
+
const $metadata = deserializeMetadata(output);
|
|
1831
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1819
1832
|
response = new ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException({
|
|
1820
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1833
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1821
1834
|
$fault: "client",
|
|
1822
|
-
$metadata
|
|
1835
|
+
$metadata,
|
|
1823
1836
|
});
|
|
1824
1837
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1825
1838
|
}
|
|
@@ -1845,8 +1858,7 @@ const deserializeAws_restJson1DescribeDomainChangeProgressCommandError = async (
|
|
|
1845
1858
|
body: await parseBody(output.body, context),
|
|
1846
1859
|
};
|
|
1847
1860
|
let response;
|
|
1848
|
-
|
|
1849
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1861
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1850
1862
|
switch (errorCode) {
|
|
1851
1863
|
case "BaseException":
|
|
1852
1864
|
case "com.amazonaws.elasticsearchservice#BaseException":
|
|
@@ -1862,10 +1874,12 @@ const deserializeAws_restJson1DescribeDomainChangeProgressCommandError = async (
|
|
|
1862
1874
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1863
1875
|
default:
|
|
1864
1876
|
const parsedBody = parsedOutput.body;
|
|
1877
|
+
const $metadata = deserializeMetadata(output);
|
|
1878
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1865
1879
|
response = new ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException({
|
|
1866
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1880
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1867
1881
|
$fault: "client",
|
|
1868
|
-
$metadata
|
|
1882
|
+
$metadata,
|
|
1869
1883
|
});
|
|
1870
1884
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1871
1885
|
}
|
|
@@ -1891,8 +1905,7 @@ const deserializeAws_restJson1DescribeElasticsearchDomainCommandError = async (o
|
|
|
1891
1905
|
body: await parseBody(output.body, context),
|
|
1892
1906
|
};
|
|
1893
1907
|
let response;
|
|
1894
|
-
|
|
1895
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1908
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1896
1909
|
switch (errorCode) {
|
|
1897
1910
|
case "BaseException":
|
|
1898
1911
|
case "com.amazonaws.elasticsearchservice#BaseException":
|
|
@@ -1908,10 +1921,12 @@ const deserializeAws_restJson1DescribeElasticsearchDomainCommandError = async (o
|
|
|
1908
1921
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1909
1922
|
default:
|
|
1910
1923
|
const parsedBody = parsedOutput.body;
|
|
1924
|
+
const $metadata = deserializeMetadata(output);
|
|
1925
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1911
1926
|
response = new ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException({
|
|
1912
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1927
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1913
1928
|
$fault: "client",
|
|
1914
|
-
$metadata
|
|
1929
|
+
$metadata,
|
|
1915
1930
|
});
|
|
1916
1931
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1917
1932
|
}
|
|
@@ -1937,8 +1952,7 @@ const deserializeAws_restJson1DescribeElasticsearchDomainConfigCommandError = as
|
|
|
1937
1952
|
body: await parseBody(output.body, context),
|
|
1938
1953
|
};
|
|
1939
1954
|
let response;
|
|
1940
|
-
|
|
1941
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1955
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1942
1956
|
switch (errorCode) {
|
|
1943
1957
|
case "BaseException":
|
|
1944
1958
|
case "com.amazonaws.elasticsearchservice#BaseException":
|
|
@@ -1954,10 +1968,12 @@ const deserializeAws_restJson1DescribeElasticsearchDomainConfigCommandError = as
|
|
|
1954
1968
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1955
1969
|
default:
|
|
1956
1970
|
const parsedBody = parsedOutput.body;
|
|
1971
|
+
const $metadata = deserializeMetadata(output);
|
|
1972
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1957
1973
|
response = new ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException({
|
|
1958
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1974
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1959
1975
|
$fault: "client",
|
|
1960
|
-
$metadata
|
|
1976
|
+
$metadata,
|
|
1961
1977
|
});
|
|
1962
1978
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1963
1979
|
}
|
|
@@ -1983,8 +1999,7 @@ const deserializeAws_restJson1DescribeElasticsearchDomainsCommandError = async (
|
|
|
1983
1999
|
body: await parseBody(output.body, context),
|
|
1984
2000
|
};
|
|
1985
2001
|
let response;
|
|
1986
|
-
|
|
1987
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2002
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1988
2003
|
switch (errorCode) {
|
|
1989
2004
|
case "BaseException":
|
|
1990
2005
|
case "com.amazonaws.elasticsearchservice#BaseException":
|
|
@@ -1997,10 +2012,12 @@ const deserializeAws_restJson1DescribeElasticsearchDomainsCommandError = async (
|
|
|
1997
2012
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1998
2013
|
default:
|
|
1999
2014
|
const parsedBody = parsedOutput.body;
|
|
2015
|
+
const $metadata = deserializeMetadata(output);
|
|
2016
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2000
2017
|
response = new ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException({
|
|
2001
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2018
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2002
2019
|
$fault: "client",
|
|
2003
|
-
$metadata
|
|
2020
|
+
$metadata,
|
|
2004
2021
|
});
|
|
2005
2022
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2006
2023
|
}
|
|
@@ -2026,8 +2043,7 @@ const deserializeAws_restJson1DescribeElasticsearchInstanceTypeLimitsCommandErro
|
|
|
2026
2043
|
body: await parseBody(output.body, context),
|
|
2027
2044
|
};
|
|
2028
2045
|
let response;
|
|
2029
|
-
|
|
2030
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2046
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2031
2047
|
switch (errorCode) {
|
|
2032
2048
|
case "BaseException":
|
|
2033
2049
|
case "com.amazonaws.elasticsearchservice#BaseException":
|
|
@@ -2049,10 +2065,12 @@ const deserializeAws_restJson1DescribeElasticsearchInstanceTypeLimitsCommandErro
|
|
|
2049
2065
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2050
2066
|
default:
|
|
2051
2067
|
const parsedBody = parsedOutput.body;
|
|
2068
|
+
const $metadata = deserializeMetadata(output);
|
|
2069
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2052
2070
|
response = new ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException({
|
|
2053
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2071
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2054
2072
|
$fault: "client",
|
|
2055
|
-
$metadata
|
|
2073
|
+
$metadata,
|
|
2056
2074
|
});
|
|
2057
2075
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2058
2076
|
}
|
|
@@ -2082,8 +2100,7 @@ const deserializeAws_restJson1DescribeInboundCrossClusterSearchConnectionsComman
|
|
|
2082
2100
|
body: await parseBody(output.body, context),
|
|
2083
2101
|
};
|
|
2084
2102
|
let response;
|
|
2085
|
-
|
|
2086
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2103
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2087
2104
|
switch (errorCode) {
|
|
2088
2105
|
case "DisabledOperationException":
|
|
2089
2106
|
case "com.amazonaws.elasticsearchservice#DisabledOperationException":
|
|
@@ -2093,10 +2110,12 @@ const deserializeAws_restJson1DescribeInboundCrossClusterSearchConnectionsComman
|
|
|
2093
2110
|
throw await deserializeAws_restJson1InvalidPaginationTokenExceptionResponse(parsedOutput, context);
|
|
2094
2111
|
default:
|
|
2095
2112
|
const parsedBody = parsedOutput.body;
|
|
2113
|
+
const $metadata = deserializeMetadata(output);
|
|
2114
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2096
2115
|
response = new ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException({
|
|
2097
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2116
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2098
2117
|
$fault: "client",
|
|
2099
|
-
$metadata
|
|
2118
|
+
$metadata,
|
|
2100
2119
|
});
|
|
2101
2120
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2102
2121
|
}
|
|
@@ -2126,8 +2145,7 @@ const deserializeAws_restJson1DescribeOutboundCrossClusterSearchConnectionsComma
|
|
|
2126
2145
|
body: await parseBody(output.body, context),
|
|
2127
2146
|
};
|
|
2128
2147
|
let response;
|
|
2129
|
-
|
|
2130
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2148
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2131
2149
|
switch (errorCode) {
|
|
2132
2150
|
case "DisabledOperationException":
|
|
2133
2151
|
case "com.amazonaws.elasticsearchservice#DisabledOperationException":
|
|
@@ -2137,10 +2155,12 @@ const deserializeAws_restJson1DescribeOutboundCrossClusterSearchConnectionsComma
|
|
|
2137
2155
|
throw await deserializeAws_restJson1InvalidPaginationTokenExceptionResponse(parsedOutput, context);
|
|
2138
2156
|
default:
|
|
2139
2157
|
const parsedBody = parsedOutput.body;
|
|
2158
|
+
const $metadata = deserializeMetadata(output);
|
|
2159
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2140
2160
|
response = new ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException({
|
|
2141
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2161
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2142
2162
|
$fault: "client",
|
|
2143
|
-
$metadata
|
|
2163
|
+
$metadata,
|
|
2144
2164
|
});
|
|
2145
2165
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2146
2166
|
}
|
|
@@ -2170,8 +2190,7 @@ const deserializeAws_restJson1DescribePackagesCommandError = async (output, cont
|
|
|
2170
2190
|
body: await parseBody(output.body, context),
|
|
2171
2191
|
};
|
|
2172
2192
|
let response;
|
|
2173
|
-
|
|
2174
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2193
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2175
2194
|
switch (errorCode) {
|
|
2176
2195
|
case "AccessDeniedException":
|
|
2177
2196
|
case "com.amazonaws.elasticsearchservice#AccessDeniedException":
|
|
@@ -2190,10 +2209,12 @@ const deserializeAws_restJson1DescribePackagesCommandError = async (output, cont
|
|
|
2190
2209
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2191
2210
|
default:
|
|
2192
2211
|
const parsedBody = parsedOutput.body;
|
|
2212
|
+
const $metadata = deserializeMetadata(output);
|
|
2213
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2193
2214
|
response = new ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException({
|
|
2194
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2215
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2195
2216
|
$fault: "client",
|
|
2196
|
-
$metadata
|
|
2217
|
+
$metadata,
|
|
2197
2218
|
});
|
|
2198
2219
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2199
2220
|
}
|
|
@@ -2224,8 +2245,7 @@ const deserializeAws_restJson1DescribeReservedElasticsearchInstanceOfferingsComm
|
|
|
2224
2245
|
body: await parseBody(output.body, context),
|
|
2225
2246
|
};
|
|
2226
2247
|
let response;
|
|
2227
|
-
|
|
2228
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2248
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2229
2249
|
switch (errorCode) {
|
|
2230
2250
|
case "DisabledOperationException":
|
|
2231
2251
|
case "com.amazonaws.elasticsearchservice#DisabledOperationException":
|
|
@@ -2241,10 +2261,12 @@ const deserializeAws_restJson1DescribeReservedElasticsearchInstanceOfferingsComm
|
|
|
2241
2261
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2242
2262
|
default:
|
|
2243
2263
|
const parsedBody = parsedOutput.body;
|
|
2264
|
+
const $metadata = deserializeMetadata(output);
|
|
2265
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2244
2266
|
response = new ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException({
|
|
2245
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2267
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2246
2268
|
$fault: "client",
|
|
2247
|
-
$metadata
|
|
2269
|
+
$metadata,
|
|
2248
2270
|
});
|
|
2249
2271
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2250
2272
|
}
|
|
@@ -2274,8 +2296,7 @@ const deserializeAws_restJson1DescribeReservedElasticsearchInstancesCommandError
|
|
|
2274
2296
|
body: await parseBody(output.body, context),
|
|
2275
2297
|
};
|
|
2276
2298
|
let response;
|
|
2277
|
-
|
|
2278
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2299
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2279
2300
|
switch (errorCode) {
|
|
2280
2301
|
case "DisabledOperationException":
|
|
2281
2302
|
case "com.amazonaws.elasticsearchservice#DisabledOperationException":
|
|
@@ -2291,10 +2312,12 @@ const deserializeAws_restJson1DescribeReservedElasticsearchInstancesCommandError
|
|
|
2291
2312
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2292
2313
|
default:
|
|
2293
2314
|
const parsedBody = parsedOutput.body;
|
|
2315
|
+
const $metadata = deserializeMetadata(output);
|
|
2316
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2294
2317
|
response = new ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException({
|
|
2295
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2318
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2296
2319
|
$fault: "client",
|
|
2297
|
-
$metadata
|
|
2320
|
+
$metadata,
|
|
2298
2321
|
});
|
|
2299
2322
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2300
2323
|
}
|
|
@@ -2320,8 +2343,7 @@ const deserializeAws_restJson1DissociatePackageCommandError = async (output, con
|
|
|
2320
2343
|
body: await parseBody(output.body, context),
|
|
2321
2344
|
};
|
|
2322
2345
|
let response;
|
|
2323
|
-
|
|
2324
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2346
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2325
2347
|
switch (errorCode) {
|
|
2326
2348
|
case "AccessDeniedException":
|
|
2327
2349
|
case "com.amazonaws.elasticsearchservice#AccessDeniedException":
|
|
@@ -2343,10 +2365,12 @@ const deserializeAws_restJson1DissociatePackageCommandError = async (output, con
|
|
|
2343
2365
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2344
2366
|
default:
|
|
2345
2367
|
const parsedBody = parsedOutput.body;
|
|
2368
|
+
const $metadata = deserializeMetadata(output);
|
|
2369
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2346
2370
|
response = new ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException({
|
|
2347
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2371
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2348
2372
|
$fault: "client",
|
|
2349
|
-
$metadata
|
|
2373
|
+
$metadata,
|
|
2350
2374
|
});
|
|
2351
2375
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2352
2376
|
}
|
|
@@ -2372,8 +2396,7 @@ const deserializeAws_restJson1GetCompatibleElasticsearchVersionsCommandError = a
|
|
|
2372
2396
|
body: await parseBody(output.body, context),
|
|
2373
2397
|
};
|
|
2374
2398
|
let response;
|
|
2375
|
-
|
|
2376
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2399
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2377
2400
|
switch (errorCode) {
|
|
2378
2401
|
case "BaseException":
|
|
2379
2402
|
case "com.amazonaws.elasticsearchservice#BaseException":
|
|
@@ -2392,10 +2415,12 @@ const deserializeAws_restJson1GetCompatibleElasticsearchVersionsCommandError = a
|
|
|
2392
2415
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2393
2416
|
default:
|
|
2394
2417
|
const parsedBody = parsedOutput.body;
|
|
2418
|
+
const $metadata = deserializeMetadata(output);
|
|
2419
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2395
2420
|
response = new ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException({
|
|
2396
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2421
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2397
2422
|
$fault: "client",
|
|
2398
|
-
$metadata
|
|
2423
|
+
$metadata,
|
|
2399
2424
|
});
|
|
2400
2425
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2401
2426
|
}
|
|
@@ -2429,8 +2454,7 @@ const deserializeAws_restJson1GetPackageVersionHistoryCommandError = async (outp
|
|
|
2429
2454
|
body: await parseBody(output.body, context),
|
|
2430
2455
|
};
|
|
2431
2456
|
let response;
|
|
2432
|
-
|
|
2433
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2457
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2434
2458
|
switch (errorCode) {
|
|
2435
2459
|
case "AccessDeniedException":
|
|
2436
2460
|
case "com.amazonaws.elasticsearchservice#AccessDeniedException":
|
|
@@ -2449,10 +2473,12 @@ const deserializeAws_restJson1GetPackageVersionHistoryCommandError = async (outp
|
|
|
2449
2473
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2450
2474
|
default:
|
|
2451
2475
|
const parsedBody = parsedOutput.body;
|
|
2476
|
+
const $metadata = deserializeMetadata(output);
|
|
2477
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2452
2478
|
response = new ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException({
|
|
2453
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2479
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2454
2480
|
$fault: "client",
|
|
2455
|
-
$metadata
|
|
2481
|
+
$metadata,
|
|
2456
2482
|
});
|
|
2457
2483
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2458
2484
|
}
|
|
@@ -2482,8 +2508,7 @@ const deserializeAws_restJson1GetUpgradeHistoryCommandError = async (output, con
|
|
|
2482
2508
|
body: await parseBody(output.body, context),
|
|
2483
2509
|
};
|
|
2484
2510
|
let response;
|
|
2485
|
-
|
|
2486
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2511
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2487
2512
|
switch (errorCode) {
|
|
2488
2513
|
case "BaseException":
|
|
2489
2514
|
case "com.amazonaws.elasticsearchservice#BaseException":
|
|
@@ -2502,10 +2527,12 @@ const deserializeAws_restJson1GetUpgradeHistoryCommandError = async (output, con
|
|
|
2502
2527
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2503
2528
|
default:
|
|
2504
2529
|
const parsedBody = parsedOutput.body;
|
|
2530
|
+
const $metadata = deserializeMetadata(output);
|
|
2531
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2505
2532
|
response = new ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException({
|
|
2506
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2533
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2507
2534
|
$fault: "client",
|
|
2508
|
-
$metadata
|
|
2535
|
+
$metadata,
|
|
2509
2536
|
});
|
|
2510
2537
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2511
2538
|
}
|
|
@@ -2539,8 +2566,7 @@ const deserializeAws_restJson1GetUpgradeStatusCommandError = async (output, cont
|
|
|
2539
2566
|
body: await parseBody(output.body, context),
|
|
2540
2567
|
};
|
|
2541
2568
|
let response;
|
|
2542
|
-
|
|
2543
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2569
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2544
2570
|
switch (errorCode) {
|
|
2545
2571
|
case "BaseException":
|
|
2546
2572
|
case "com.amazonaws.elasticsearchservice#BaseException":
|
|
@@ -2559,10 +2585,12 @@ const deserializeAws_restJson1GetUpgradeStatusCommandError = async (output, cont
|
|
|
2559
2585
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2560
2586
|
default:
|
|
2561
2587
|
const parsedBody = parsedOutput.body;
|
|
2588
|
+
const $metadata = deserializeMetadata(output);
|
|
2589
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2562
2590
|
response = new ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException({
|
|
2563
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2591
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2564
2592
|
$fault: "client",
|
|
2565
|
-
$metadata
|
|
2593
|
+
$metadata,
|
|
2566
2594
|
});
|
|
2567
2595
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2568
2596
|
}
|
|
@@ -2588,8 +2616,7 @@ const deserializeAws_restJson1ListDomainNamesCommandError = async (output, conte
|
|
|
2588
2616
|
body: await parseBody(output.body, context),
|
|
2589
2617
|
};
|
|
2590
2618
|
let response;
|
|
2591
|
-
|
|
2592
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2619
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2593
2620
|
switch (errorCode) {
|
|
2594
2621
|
case "BaseException":
|
|
2595
2622
|
case "com.amazonaws.elasticsearchservice#BaseException":
|
|
@@ -2599,10 +2626,12 @@ const deserializeAws_restJson1ListDomainNamesCommandError = async (output, conte
|
|
|
2599
2626
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2600
2627
|
default:
|
|
2601
2628
|
const parsedBody = parsedOutput.body;
|
|
2629
|
+
const $metadata = deserializeMetadata(output);
|
|
2630
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2602
2631
|
response = new ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException({
|
|
2603
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2632
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2604
2633
|
$fault: "client",
|
|
2605
|
-
$metadata
|
|
2634
|
+
$metadata,
|
|
2606
2635
|
});
|
|
2607
2636
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2608
2637
|
}
|
|
@@ -2632,8 +2661,7 @@ const deserializeAws_restJson1ListDomainsForPackageCommandError = async (output,
|
|
|
2632
2661
|
body: await parseBody(output.body, context),
|
|
2633
2662
|
};
|
|
2634
2663
|
let response;
|
|
2635
|
-
|
|
2636
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2664
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2637
2665
|
switch (errorCode) {
|
|
2638
2666
|
case "AccessDeniedException":
|
|
2639
2667
|
case "com.amazonaws.elasticsearchservice#AccessDeniedException":
|
|
@@ -2652,10 +2680,12 @@ const deserializeAws_restJson1ListDomainsForPackageCommandError = async (output,
|
|
|
2652
2680
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2653
2681
|
default:
|
|
2654
2682
|
const parsedBody = parsedOutput.body;
|
|
2683
|
+
const $metadata = deserializeMetadata(output);
|
|
2684
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2655
2685
|
response = new ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException({
|
|
2656
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2686
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2657
2687
|
$fault: "client",
|
|
2658
|
-
$metadata
|
|
2688
|
+
$metadata,
|
|
2659
2689
|
});
|
|
2660
2690
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2661
2691
|
}
|
|
@@ -2685,8 +2715,7 @@ const deserializeAws_restJson1ListElasticsearchInstanceTypesCommandError = async
|
|
|
2685
2715
|
body: await parseBody(output.body, context),
|
|
2686
2716
|
};
|
|
2687
2717
|
let response;
|
|
2688
|
-
|
|
2689
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2718
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2690
2719
|
switch (errorCode) {
|
|
2691
2720
|
case "BaseException":
|
|
2692
2721
|
case "com.amazonaws.elasticsearchservice#BaseException":
|
|
@@ -2702,10 +2731,12 @@ const deserializeAws_restJson1ListElasticsearchInstanceTypesCommandError = async
|
|
|
2702
2731
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2703
2732
|
default:
|
|
2704
2733
|
const parsedBody = parsedOutput.body;
|
|
2734
|
+
const $metadata = deserializeMetadata(output);
|
|
2735
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2705
2736
|
response = new ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException({
|
|
2706
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2737
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2707
2738
|
$fault: "client",
|
|
2708
|
-
$metadata
|
|
2739
|
+
$metadata,
|
|
2709
2740
|
});
|
|
2710
2741
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2711
2742
|
}
|
|
@@ -2735,8 +2766,7 @@ const deserializeAws_restJson1ListElasticsearchVersionsCommandError = async (out
|
|
|
2735
2766
|
body: await parseBody(output.body, context),
|
|
2736
2767
|
};
|
|
2737
2768
|
let response;
|
|
2738
|
-
|
|
2739
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2769
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2740
2770
|
switch (errorCode) {
|
|
2741
2771
|
case "BaseException":
|
|
2742
2772
|
case "com.amazonaws.elasticsearchservice#BaseException":
|
|
@@ -2752,10 +2782,12 @@ const deserializeAws_restJson1ListElasticsearchVersionsCommandError = async (out
|
|
|
2752
2782
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2753
2783
|
default:
|
|
2754
2784
|
const parsedBody = parsedOutput.body;
|
|
2785
|
+
const $metadata = deserializeMetadata(output);
|
|
2786
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2755
2787
|
response = new ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException({
|
|
2756
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2788
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2757
2789
|
$fault: "client",
|
|
2758
|
-
$metadata
|
|
2790
|
+
$metadata,
|
|
2759
2791
|
});
|
|
2760
2792
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2761
2793
|
}
|
|
@@ -2785,8 +2817,7 @@ const deserializeAws_restJson1ListPackagesForDomainCommandError = async (output,
|
|
|
2785
2817
|
body: await parseBody(output.body, context),
|
|
2786
2818
|
};
|
|
2787
2819
|
let response;
|
|
2788
|
-
|
|
2789
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2820
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2790
2821
|
switch (errorCode) {
|
|
2791
2822
|
case "AccessDeniedException":
|
|
2792
2823
|
case "com.amazonaws.elasticsearchservice#AccessDeniedException":
|
|
@@ -2805,10 +2836,12 @@ const deserializeAws_restJson1ListPackagesForDomainCommandError = async (output,
|
|
|
2805
2836
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2806
2837
|
default:
|
|
2807
2838
|
const parsedBody = parsedOutput.body;
|
|
2839
|
+
const $metadata = deserializeMetadata(output);
|
|
2840
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2808
2841
|
response = new ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException({
|
|
2809
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2842
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2810
2843
|
$fault: "client",
|
|
2811
|
-
$metadata
|
|
2844
|
+
$metadata,
|
|
2812
2845
|
});
|
|
2813
2846
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2814
2847
|
}
|
|
@@ -2834,8 +2867,7 @@ const deserializeAws_restJson1ListTagsCommandError = async (output, context) =>
|
|
|
2834
2867
|
body: await parseBody(output.body, context),
|
|
2835
2868
|
};
|
|
2836
2869
|
let response;
|
|
2837
|
-
|
|
2838
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2870
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2839
2871
|
switch (errorCode) {
|
|
2840
2872
|
case "BaseException":
|
|
2841
2873
|
case "com.amazonaws.elasticsearchservice#BaseException":
|
|
@@ -2851,10 +2883,12 @@ const deserializeAws_restJson1ListTagsCommandError = async (output, context) =>
|
|
|
2851
2883
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2852
2884
|
default:
|
|
2853
2885
|
const parsedBody = parsedOutput.body;
|
|
2886
|
+
const $metadata = deserializeMetadata(output);
|
|
2887
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2854
2888
|
response = new ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException({
|
|
2855
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2889
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2856
2890
|
$fault: "client",
|
|
2857
|
-
$metadata
|
|
2891
|
+
$metadata,
|
|
2858
2892
|
});
|
|
2859
2893
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2860
2894
|
}
|
|
@@ -2884,8 +2918,7 @@ const deserializeAws_restJson1PurchaseReservedElasticsearchInstanceOfferingComma
|
|
|
2884
2918
|
body: await parseBody(output.body, context),
|
|
2885
2919
|
};
|
|
2886
2920
|
let response;
|
|
2887
|
-
|
|
2888
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2921
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2889
2922
|
switch (errorCode) {
|
|
2890
2923
|
case "DisabledOperationException":
|
|
2891
2924
|
case "com.amazonaws.elasticsearchservice#DisabledOperationException":
|
|
@@ -2907,10 +2940,12 @@ const deserializeAws_restJson1PurchaseReservedElasticsearchInstanceOfferingComma
|
|
|
2907
2940
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2908
2941
|
default:
|
|
2909
2942
|
const parsedBody = parsedOutput.body;
|
|
2943
|
+
const $metadata = deserializeMetadata(output);
|
|
2944
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2910
2945
|
response = new ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException({
|
|
2911
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2946
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2912
2947
|
$fault: "client",
|
|
2913
|
-
$metadata
|
|
2948
|
+
$metadata,
|
|
2914
2949
|
});
|
|
2915
2950
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2916
2951
|
}
|
|
@@ -2936,8 +2971,7 @@ const deserializeAws_restJson1RejectInboundCrossClusterSearchConnectionCommandEr
|
|
|
2936
2971
|
body: await parseBody(output.body, context),
|
|
2937
2972
|
};
|
|
2938
2973
|
let response;
|
|
2939
|
-
|
|
2940
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2974
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2941
2975
|
switch (errorCode) {
|
|
2942
2976
|
case "DisabledOperationException":
|
|
2943
2977
|
case "com.amazonaws.elasticsearchservice#DisabledOperationException":
|
|
@@ -2947,10 +2981,12 @@ const deserializeAws_restJson1RejectInboundCrossClusterSearchConnectionCommandEr
|
|
|
2947
2981
|
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
2948
2982
|
default:
|
|
2949
2983
|
const parsedBody = parsedOutput.body;
|
|
2984
|
+
const $metadata = deserializeMetadata(output);
|
|
2985
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2950
2986
|
response = new ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException({
|
|
2951
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2987
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2952
2988
|
$fault: "client",
|
|
2953
|
-
$metadata
|
|
2989
|
+
$metadata,
|
|
2954
2990
|
});
|
|
2955
2991
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2956
2992
|
}
|
|
@@ -2972,8 +3008,7 @@ const deserializeAws_restJson1RemoveTagsCommandError = async (output, context) =
|
|
|
2972
3008
|
body: await parseBody(output.body, context),
|
|
2973
3009
|
};
|
|
2974
3010
|
let response;
|
|
2975
|
-
|
|
2976
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3011
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2977
3012
|
switch (errorCode) {
|
|
2978
3013
|
case "BaseException":
|
|
2979
3014
|
case "com.amazonaws.elasticsearchservice#BaseException":
|
|
@@ -2986,10 +3021,12 @@ const deserializeAws_restJson1RemoveTagsCommandError = async (output, context) =
|
|
|
2986
3021
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2987
3022
|
default:
|
|
2988
3023
|
const parsedBody = parsedOutput.body;
|
|
3024
|
+
const $metadata = deserializeMetadata(output);
|
|
3025
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2989
3026
|
response = new ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException({
|
|
2990
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3027
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2991
3028
|
$fault: "client",
|
|
2992
|
-
$metadata
|
|
3029
|
+
$metadata,
|
|
2993
3030
|
});
|
|
2994
3031
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2995
3032
|
}
|
|
@@ -3015,8 +3052,7 @@ const deserializeAws_restJson1StartElasticsearchServiceSoftwareUpdateCommandErro
|
|
|
3015
3052
|
body: await parseBody(output.body, context),
|
|
3016
3053
|
};
|
|
3017
3054
|
let response;
|
|
3018
|
-
|
|
3019
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3055
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3020
3056
|
switch (errorCode) {
|
|
3021
3057
|
case "BaseException":
|
|
3022
3058
|
case "com.amazonaws.elasticsearchservice#BaseException":
|
|
@@ -3032,10 +3068,12 @@ const deserializeAws_restJson1StartElasticsearchServiceSoftwareUpdateCommandErro
|
|
|
3032
3068
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
3033
3069
|
default:
|
|
3034
3070
|
const parsedBody = parsedOutput.body;
|
|
3071
|
+
const $metadata = deserializeMetadata(output);
|
|
3072
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3035
3073
|
response = new ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException({
|
|
3036
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3074
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3037
3075
|
$fault: "client",
|
|
3038
|
-
$metadata
|
|
3076
|
+
$metadata,
|
|
3039
3077
|
});
|
|
3040
3078
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3041
3079
|
}
|
|
@@ -3065,8 +3103,7 @@ const deserializeAws_restJson1UpdateElasticsearchDomainConfigCommandError = asyn
|
|
|
3065
3103
|
body: await parseBody(output.body, context),
|
|
3066
3104
|
};
|
|
3067
3105
|
let response;
|
|
3068
|
-
|
|
3069
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3106
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3070
3107
|
switch (errorCode) {
|
|
3071
3108
|
case "BaseException":
|
|
3072
3109
|
case "com.amazonaws.elasticsearchservice#BaseException":
|
|
@@ -3088,10 +3125,12 @@ const deserializeAws_restJson1UpdateElasticsearchDomainConfigCommandError = asyn
|
|
|
3088
3125
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
3089
3126
|
default:
|
|
3090
3127
|
const parsedBody = parsedOutput.body;
|
|
3128
|
+
const $metadata = deserializeMetadata(output);
|
|
3129
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3091
3130
|
response = new ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException({
|
|
3092
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3131
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3093
3132
|
$fault: "client",
|
|
3094
|
-
$metadata
|
|
3133
|
+
$metadata,
|
|
3095
3134
|
});
|
|
3096
3135
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3097
3136
|
}
|
|
@@ -3117,8 +3156,7 @@ const deserializeAws_restJson1UpdatePackageCommandError = async (output, context
|
|
|
3117
3156
|
body: await parseBody(output.body, context),
|
|
3118
3157
|
};
|
|
3119
3158
|
let response;
|
|
3120
|
-
|
|
3121
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3159
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3122
3160
|
switch (errorCode) {
|
|
3123
3161
|
case "AccessDeniedException":
|
|
3124
3162
|
case "com.amazonaws.elasticsearchservice#AccessDeniedException":
|
|
@@ -3140,10 +3178,12 @@ const deserializeAws_restJson1UpdatePackageCommandError = async (output, context
|
|
|
3140
3178
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
3141
3179
|
default:
|
|
3142
3180
|
const parsedBody = parsedOutput.body;
|
|
3181
|
+
const $metadata = deserializeMetadata(output);
|
|
3182
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3143
3183
|
response = new ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException({
|
|
3144
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3184
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3145
3185
|
$fault: "client",
|
|
3146
|
-
$metadata
|
|
3186
|
+
$metadata,
|
|
3147
3187
|
});
|
|
3148
3188
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3149
3189
|
}
|
|
@@ -3181,8 +3221,7 @@ const deserializeAws_restJson1UpgradeElasticsearchDomainCommandError = async (ou
|
|
|
3181
3221
|
body: await parseBody(output.body, context),
|
|
3182
3222
|
};
|
|
3183
3223
|
let response;
|
|
3184
|
-
|
|
3185
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3224
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3186
3225
|
switch (errorCode) {
|
|
3187
3226
|
case "BaseException":
|
|
3188
3227
|
case "com.amazonaws.elasticsearchservice#BaseException":
|
|
@@ -3204,10 +3243,12 @@ const deserializeAws_restJson1UpgradeElasticsearchDomainCommandError = async (ou
|
|
|
3204
3243
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
3205
3244
|
default:
|
|
3206
3245
|
const parsedBody = parsedOutput.body;
|
|
3246
|
+
const $metadata = deserializeMetadata(output);
|
|
3247
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3207
3248
|
response = new ElasticsearchServiceServiceException_1.ElasticsearchServiceServiceException({
|
|
3208
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3249
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3209
3250
|
$fault: "client",
|
|
3210
|
-
$metadata
|
|
3251
|
+
$metadata,
|
|
3211
3252
|
});
|
|
3212
3253
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3213
3254
|
}
|
|
@@ -4768,5 +4809,4 @@ const loadRestJsonErrorCode = (output, data) => {
|
|
|
4768
4809
|
if (data["__type"] !== undefined) {
|
|
4769
4810
|
return sanitizeErrorCode(data["__type"]);
|
|
4770
4811
|
}
|
|
4771
|
-
return "";
|
|
4772
4812
|
};
|