@aws-sdk/client-securityhub 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 +280 -225
- package/dist-es/protocols/Aws_restJson1.js +280 -225
- package/package.json +6 -6
|
@@ -1410,8 +1410,7 @@ const deserializeAws_restJson1AcceptAdministratorInvitationCommandError = async
|
|
|
1410
1410
|
body: await parseBody(output.body, context),
|
|
1411
1411
|
};
|
|
1412
1412
|
let response;
|
|
1413
|
-
|
|
1414
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1413
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1415
1414
|
switch (errorCode) {
|
|
1416
1415
|
case "InternalException":
|
|
1417
1416
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -1430,10 +1429,12 @@ const deserializeAws_restJson1AcceptAdministratorInvitationCommandError = async
|
|
|
1430
1429
|
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1431
1430
|
default:
|
|
1432
1431
|
const parsedBody = parsedOutput.body;
|
|
1432
|
+
const $metadata = deserializeMetadata(output);
|
|
1433
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1433
1434
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
1434
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1435
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1435
1436
|
$fault: "client",
|
|
1436
|
-
$metadata
|
|
1437
|
+
$metadata,
|
|
1437
1438
|
});
|
|
1438
1439
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1439
1440
|
}
|
|
@@ -1455,8 +1456,7 @@ const deserializeAws_restJson1AcceptInvitationCommandError = async (output, cont
|
|
|
1455
1456
|
body: await parseBody(output.body, context),
|
|
1456
1457
|
};
|
|
1457
1458
|
let response;
|
|
1458
|
-
|
|
1459
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1459
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1460
1460
|
switch (errorCode) {
|
|
1461
1461
|
case "InternalException":
|
|
1462
1462
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -1475,10 +1475,12 @@ const deserializeAws_restJson1AcceptInvitationCommandError = async (output, cont
|
|
|
1475
1475
|
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1476
1476
|
default:
|
|
1477
1477
|
const parsedBody = parsedOutput.body;
|
|
1478
|
+
const $metadata = deserializeMetadata(output);
|
|
1479
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1478
1480
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
1479
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1481
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1480
1482
|
$fault: "client",
|
|
1481
|
-
$metadata
|
|
1483
|
+
$metadata,
|
|
1482
1484
|
});
|
|
1483
1485
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1484
1486
|
}
|
|
@@ -1504,8 +1506,7 @@ const deserializeAws_restJson1BatchDisableStandardsCommandError = async (output,
|
|
|
1504
1506
|
body: await parseBody(output.body, context),
|
|
1505
1507
|
};
|
|
1506
1508
|
let response;
|
|
1507
|
-
|
|
1508
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1509
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1509
1510
|
switch (errorCode) {
|
|
1510
1511
|
case "InternalException":
|
|
1511
1512
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -1521,10 +1522,12 @@ const deserializeAws_restJson1BatchDisableStandardsCommandError = async (output,
|
|
|
1521
1522
|
throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
|
|
1522
1523
|
default:
|
|
1523
1524
|
const parsedBody = parsedOutput.body;
|
|
1525
|
+
const $metadata = deserializeMetadata(output);
|
|
1526
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1524
1527
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
1525
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1528
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1526
1529
|
$fault: "client",
|
|
1527
|
-
$metadata
|
|
1530
|
+
$metadata,
|
|
1528
1531
|
});
|
|
1529
1532
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1530
1533
|
}
|
|
@@ -1550,8 +1553,7 @@ const deserializeAws_restJson1BatchEnableStandardsCommandError = async (output,
|
|
|
1550
1553
|
body: await parseBody(output.body, context),
|
|
1551
1554
|
};
|
|
1552
1555
|
let response;
|
|
1553
|
-
|
|
1554
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1556
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1555
1557
|
switch (errorCode) {
|
|
1556
1558
|
case "InternalException":
|
|
1557
1559
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -1567,10 +1569,12 @@ const deserializeAws_restJson1BatchEnableStandardsCommandError = async (output,
|
|
|
1567
1569
|
throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
|
|
1568
1570
|
default:
|
|
1569
1571
|
const parsedBody = parsedOutput.body;
|
|
1572
|
+
const $metadata = deserializeMetadata(output);
|
|
1573
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1570
1574
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
1571
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1575
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1572
1576
|
$fault: "client",
|
|
1573
|
-
$metadata
|
|
1577
|
+
$metadata,
|
|
1574
1578
|
});
|
|
1575
1579
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1576
1580
|
}
|
|
@@ -1604,8 +1608,7 @@ const deserializeAws_restJson1BatchImportFindingsCommandError = async (output, c
|
|
|
1604
1608
|
body: await parseBody(output.body, context),
|
|
1605
1609
|
};
|
|
1606
1610
|
let response;
|
|
1607
|
-
|
|
1608
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1611
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1609
1612
|
switch (errorCode) {
|
|
1610
1613
|
case "InternalException":
|
|
1611
1614
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -1621,10 +1624,12 @@ const deserializeAws_restJson1BatchImportFindingsCommandError = async (output, c
|
|
|
1621
1624
|
throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
|
|
1622
1625
|
default:
|
|
1623
1626
|
const parsedBody = parsedOutput.body;
|
|
1627
|
+
const $metadata = deserializeMetadata(output);
|
|
1628
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1624
1629
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
1625
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1630
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1626
1631
|
$fault: "client",
|
|
1627
|
-
$metadata
|
|
1632
|
+
$metadata,
|
|
1628
1633
|
});
|
|
1629
1634
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1630
1635
|
}
|
|
@@ -1654,8 +1659,7 @@ const deserializeAws_restJson1BatchUpdateFindingsCommandError = async (output, c
|
|
|
1654
1659
|
body: await parseBody(output.body, context),
|
|
1655
1660
|
};
|
|
1656
1661
|
let response;
|
|
1657
|
-
|
|
1658
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1662
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1659
1663
|
switch (errorCode) {
|
|
1660
1664
|
case "InternalException":
|
|
1661
1665
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -1671,10 +1675,12 @@ const deserializeAws_restJson1BatchUpdateFindingsCommandError = async (output, c
|
|
|
1671
1675
|
throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
|
|
1672
1676
|
default:
|
|
1673
1677
|
const parsedBody = parsedOutput.body;
|
|
1678
|
+
const $metadata = deserializeMetadata(output);
|
|
1679
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1674
1680
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
1675
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1681
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1676
1682
|
$fault: "client",
|
|
1677
|
-
$metadata
|
|
1683
|
+
$metadata,
|
|
1678
1684
|
});
|
|
1679
1685
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1680
1686
|
}
|
|
@@ -1700,8 +1706,7 @@ const deserializeAws_restJson1CreateActionTargetCommandError = async (output, co
|
|
|
1700
1706
|
body: await parseBody(output.body, context),
|
|
1701
1707
|
};
|
|
1702
1708
|
let response;
|
|
1703
|
-
|
|
1704
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1709
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1705
1710
|
switch (errorCode) {
|
|
1706
1711
|
case "InternalException":
|
|
1707
1712
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -1720,10 +1725,12 @@ const deserializeAws_restJson1CreateActionTargetCommandError = async (output, co
|
|
|
1720
1725
|
throw await deserializeAws_restJson1ResourceConflictExceptionResponse(parsedOutput, context);
|
|
1721
1726
|
default:
|
|
1722
1727
|
const parsedBody = parsedOutput.body;
|
|
1728
|
+
const $metadata = deserializeMetadata(output);
|
|
1729
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1723
1730
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
1724
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1731
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1725
1732
|
$fault: "client",
|
|
1726
|
-
$metadata
|
|
1733
|
+
$metadata,
|
|
1727
1734
|
});
|
|
1728
1735
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1729
1736
|
}
|
|
@@ -1761,8 +1768,7 @@ const deserializeAws_restJson1CreateFindingAggregatorCommandError = async (outpu
|
|
|
1761
1768
|
body: await parseBody(output.body, context),
|
|
1762
1769
|
};
|
|
1763
1770
|
let response;
|
|
1764
|
-
|
|
1765
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1771
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1766
1772
|
switch (errorCode) {
|
|
1767
1773
|
case "AccessDeniedException":
|
|
1768
1774
|
case "com.amazonaws.securityhub#AccessDeniedException":
|
|
@@ -1781,10 +1787,12 @@ const deserializeAws_restJson1CreateFindingAggregatorCommandError = async (outpu
|
|
|
1781
1787
|
throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
|
|
1782
1788
|
default:
|
|
1783
1789
|
const parsedBody = parsedOutput.body;
|
|
1790
|
+
const $metadata = deserializeMetadata(output);
|
|
1791
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1784
1792
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
1785
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1793
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1786
1794
|
$fault: "client",
|
|
1787
|
-
$metadata
|
|
1795
|
+
$metadata,
|
|
1788
1796
|
});
|
|
1789
1797
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1790
1798
|
}
|
|
@@ -1810,8 +1818,7 @@ const deserializeAws_restJson1CreateInsightCommandError = async (output, context
|
|
|
1810
1818
|
body: await parseBody(output.body, context),
|
|
1811
1819
|
};
|
|
1812
1820
|
let response;
|
|
1813
|
-
|
|
1814
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1821
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1815
1822
|
switch (errorCode) {
|
|
1816
1823
|
case "InternalException":
|
|
1817
1824
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -1830,10 +1837,12 @@ const deserializeAws_restJson1CreateInsightCommandError = async (output, context
|
|
|
1830
1837
|
throw await deserializeAws_restJson1ResourceConflictExceptionResponse(parsedOutput, context);
|
|
1831
1838
|
default:
|
|
1832
1839
|
const parsedBody = parsedOutput.body;
|
|
1840
|
+
const $metadata = deserializeMetadata(output);
|
|
1841
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1833
1842
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
1834
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1843
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1835
1844
|
$fault: "client",
|
|
1836
|
-
$metadata
|
|
1845
|
+
$metadata,
|
|
1837
1846
|
});
|
|
1838
1847
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1839
1848
|
}
|
|
@@ -1859,8 +1868,7 @@ const deserializeAws_restJson1CreateMembersCommandError = async (output, context
|
|
|
1859
1868
|
body: await parseBody(output.body, context),
|
|
1860
1869
|
};
|
|
1861
1870
|
let response;
|
|
1862
|
-
|
|
1863
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1871
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1864
1872
|
switch (errorCode) {
|
|
1865
1873
|
case "InternalException":
|
|
1866
1874
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -1879,10 +1887,12 @@ const deserializeAws_restJson1CreateMembersCommandError = async (output, context
|
|
|
1879
1887
|
throw await deserializeAws_restJson1ResourceConflictExceptionResponse(parsedOutput, context);
|
|
1880
1888
|
default:
|
|
1881
1889
|
const parsedBody = parsedOutput.body;
|
|
1890
|
+
const $metadata = deserializeMetadata(output);
|
|
1891
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1882
1892
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
1883
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1893
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1884
1894
|
$fault: "client",
|
|
1885
|
-
$metadata
|
|
1895
|
+
$metadata,
|
|
1886
1896
|
});
|
|
1887
1897
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1888
1898
|
}
|
|
@@ -1908,8 +1918,7 @@ const deserializeAws_restJson1DeclineInvitationsCommandError = async (output, co
|
|
|
1908
1918
|
body: await parseBody(output.body, context),
|
|
1909
1919
|
};
|
|
1910
1920
|
let response;
|
|
1911
|
-
|
|
1912
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1921
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1913
1922
|
switch (errorCode) {
|
|
1914
1923
|
case "InternalException":
|
|
1915
1924
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -1925,10 +1934,12 @@ const deserializeAws_restJson1DeclineInvitationsCommandError = async (output, co
|
|
|
1925
1934
|
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1926
1935
|
default:
|
|
1927
1936
|
const parsedBody = parsedOutput.body;
|
|
1937
|
+
const $metadata = deserializeMetadata(output);
|
|
1938
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1928
1939
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
1929
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1940
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1930
1941
|
$fault: "client",
|
|
1931
|
-
$metadata
|
|
1942
|
+
$metadata,
|
|
1932
1943
|
});
|
|
1933
1944
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1934
1945
|
}
|
|
@@ -1954,8 +1965,7 @@ const deserializeAws_restJson1DeleteActionTargetCommandError = async (output, co
|
|
|
1954
1965
|
body: await parseBody(output.body, context),
|
|
1955
1966
|
};
|
|
1956
1967
|
let response;
|
|
1957
|
-
|
|
1958
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1968
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1959
1969
|
switch (errorCode) {
|
|
1960
1970
|
case "InternalException":
|
|
1961
1971
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -1971,10 +1981,12 @@ const deserializeAws_restJson1DeleteActionTargetCommandError = async (output, co
|
|
|
1971
1981
|
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1972
1982
|
default:
|
|
1973
1983
|
const parsedBody = parsedOutput.body;
|
|
1984
|
+
const $metadata = deserializeMetadata(output);
|
|
1985
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1974
1986
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
1975
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1987
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1976
1988
|
$fault: "client",
|
|
1977
|
-
$metadata
|
|
1989
|
+
$metadata,
|
|
1978
1990
|
});
|
|
1979
1991
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1980
1992
|
}
|
|
@@ -1996,8 +2008,7 @@ const deserializeAws_restJson1DeleteFindingAggregatorCommandError = async (outpu
|
|
|
1996
2008
|
body: await parseBody(output.body, context),
|
|
1997
2009
|
};
|
|
1998
2010
|
let response;
|
|
1999
|
-
|
|
2000
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2011
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2001
2012
|
switch (errorCode) {
|
|
2002
2013
|
case "AccessDeniedException":
|
|
2003
2014
|
case "com.amazonaws.securityhub#AccessDeniedException":
|
|
@@ -2019,10 +2030,12 @@ const deserializeAws_restJson1DeleteFindingAggregatorCommandError = async (outpu
|
|
|
2019
2030
|
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
2020
2031
|
default:
|
|
2021
2032
|
const parsedBody = parsedOutput.body;
|
|
2033
|
+
const $metadata = deserializeMetadata(output);
|
|
2034
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2022
2035
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
2023
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2036
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2024
2037
|
$fault: "client",
|
|
2025
|
-
$metadata
|
|
2038
|
+
$metadata,
|
|
2026
2039
|
});
|
|
2027
2040
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2028
2041
|
}
|
|
@@ -2048,8 +2061,7 @@ const deserializeAws_restJson1DeleteInsightCommandError = async (output, context
|
|
|
2048
2061
|
body: await parseBody(output.body, context),
|
|
2049
2062
|
};
|
|
2050
2063
|
let response;
|
|
2051
|
-
|
|
2052
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2064
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2053
2065
|
switch (errorCode) {
|
|
2054
2066
|
case "InternalException":
|
|
2055
2067
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -2068,10 +2080,12 @@ const deserializeAws_restJson1DeleteInsightCommandError = async (output, context
|
|
|
2068
2080
|
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
2069
2081
|
default:
|
|
2070
2082
|
const parsedBody = parsedOutput.body;
|
|
2083
|
+
const $metadata = deserializeMetadata(output);
|
|
2084
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2071
2085
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
2072
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2086
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2073
2087
|
$fault: "client",
|
|
2074
|
-
$metadata
|
|
2088
|
+
$metadata,
|
|
2075
2089
|
});
|
|
2076
2090
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2077
2091
|
}
|
|
@@ -2097,8 +2111,7 @@ const deserializeAws_restJson1DeleteInvitationsCommandError = async (output, con
|
|
|
2097
2111
|
body: await parseBody(output.body, context),
|
|
2098
2112
|
};
|
|
2099
2113
|
let response;
|
|
2100
|
-
|
|
2101
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2114
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2102
2115
|
switch (errorCode) {
|
|
2103
2116
|
case "InternalException":
|
|
2104
2117
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -2117,10 +2130,12 @@ const deserializeAws_restJson1DeleteInvitationsCommandError = async (output, con
|
|
|
2117
2130
|
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
2118
2131
|
default:
|
|
2119
2132
|
const parsedBody = parsedOutput.body;
|
|
2133
|
+
const $metadata = deserializeMetadata(output);
|
|
2134
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2120
2135
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
2121
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2136
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2122
2137
|
$fault: "client",
|
|
2123
|
-
$metadata
|
|
2138
|
+
$metadata,
|
|
2124
2139
|
});
|
|
2125
2140
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2126
2141
|
}
|
|
@@ -2146,8 +2161,7 @@ const deserializeAws_restJson1DeleteMembersCommandError = async (output, context
|
|
|
2146
2161
|
body: await parseBody(output.body, context),
|
|
2147
2162
|
};
|
|
2148
2163
|
let response;
|
|
2149
|
-
|
|
2150
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2164
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2151
2165
|
switch (errorCode) {
|
|
2152
2166
|
case "InternalException":
|
|
2153
2167
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -2166,10 +2180,12 @@ const deserializeAws_restJson1DeleteMembersCommandError = async (output, context
|
|
|
2166
2180
|
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
2167
2181
|
default:
|
|
2168
2182
|
const parsedBody = parsedOutput.body;
|
|
2183
|
+
const $metadata = deserializeMetadata(output);
|
|
2184
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2169
2185
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
2170
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2186
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2171
2187
|
$fault: "client",
|
|
2172
|
-
$metadata
|
|
2188
|
+
$metadata,
|
|
2173
2189
|
});
|
|
2174
2190
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2175
2191
|
}
|
|
@@ -2199,8 +2215,7 @@ const deserializeAws_restJson1DescribeActionTargetsCommandError = async (output,
|
|
|
2199
2215
|
body: await parseBody(output.body, context),
|
|
2200
2216
|
};
|
|
2201
2217
|
let response;
|
|
2202
|
-
|
|
2203
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2218
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2204
2219
|
switch (errorCode) {
|
|
2205
2220
|
case "InternalException":
|
|
2206
2221
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -2216,10 +2231,12 @@ const deserializeAws_restJson1DescribeActionTargetsCommandError = async (output,
|
|
|
2216
2231
|
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
2217
2232
|
default:
|
|
2218
2233
|
const parsedBody = parsedOutput.body;
|
|
2234
|
+
const $metadata = deserializeMetadata(output);
|
|
2235
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2219
2236
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
2220
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2237
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2221
2238
|
$fault: "client",
|
|
2222
|
-
$metadata
|
|
2239
|
+
$metadata,
|
|
2223
2240
|
});
|
|
2224
2241
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2225
2242
|
}
|
|
@@ -2253,8 +2270,7 @@ const deserializeAws_restJson1DescribeHubCommandError = async (output, context)
|
|
|
2253
2270
|
body: await parseBody(output.body, context),
|
|
2254
2271
|
};
|
|
2255
2272
|
let response;
|
|
2256
|
-
|
|
2257
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2273
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2258
2274
|
switch (errorCode) {
|
|
2259
2275
|
case "InternalException":
|
|
2260
2276
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -2273,10 +2289,12 @@ const deserializeAws_restJson1DescribeHubCommandError = async (output, context)
|
|
|
2273
2289
|
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
2274
2290
|
default:
|
|
2275
2291
|
const parsedBody = parsedOutput.body;
|
|
2292
|
+
const $metadata = deserializeMetadata(output);
|
|
2293
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2276
2294
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
2277
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2295
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2278
2296
|
$fault: "client",
|
|
2279
|
-
$metadata
|
|
2297
|
+
$metadata,
|
|
2280
2298
|
});
|
|
2281
2299
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2282
2300
|
}
|
|
@@ -2310,8 +2328,7 @@ const deserializeAws_restJson1DescribeOrganizationConfigurationCommandError = as
|
|
|
2310
2328
|
body: await parseBody(output.body, context),
|
|
2311
2329
|
};
|
|
2312
2330
|
let response;
|
|
2313
|
-
|
|
2314
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2331
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2315
2332
|
switch (errorCode) {
|
|
2316
2333
|
case "InternalException":
|
|
2317
2334
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -2327,10 +2344,12 @@ const deserializeAws_restJson1DescribeOrganizationConfigurationCommandError = as
|
|
|
2327
2344
|
throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
|
|
2328
2345
|
default:
|
|
2329
2346
|
const parsedBody = parsedOutput.body;
|
|
2347
|
+
const $metadata = deserializeMetadata(output);
|
|
2348
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2330
2349
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
2331
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2350
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2332
2351
|
$fault: "client",
|
|
2333
|
-
$metadata
|
|
2352
|
+
$metadata,
|
|
2334
2353
|
});
|
|
2335
2354
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2336
2355
|
}
|
|
@@ -2360,8 +2379,7 @@ const deserializeAws_restJson1DescribeProductsCommandError = async (output, cont
|
|
|
2360
2379
|
body: await parseBody(output.body, context),
|
|
2361
2380
|
};
|
|
2362
2381
|
let response;
|
|
2363
|
-
|
|
2364
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2382
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2365
2383
|
switch (errorCode) {
|
|
2366
2384
|
case "InternalException":
|
|
2367
2385
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -2377,10 +2395,12 @@ const deserializeAws_restJson1DescribeProductsCommandError = async (output, cont
|
|
|
2377
2395
|
throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
|
|
2378
2396
|
default:
|
|
2379
2397
|
const parsedBody = parsedOutput.body;
|
|
2398
|
+
const $metadata = deserializeMetadata(output);
|
|
2399
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2380
2400
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
2381
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2401
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2382
2402
|
$fault: "client",
|
|
2383
|
-
$metadata
|
|
2403
|
+
$metadata,
|
|
2384
2404
|
});
|
|
2385
2405
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2386
2406
|
}
|
|
@@ -2410,8 +2430,7 @@ const deserializeAws_restJson1DescribeStandardsCommandError = async (output, con
|
|
|
2410
2430
|
body: await parseBody(output.body, context),
|
|
2411
2431
|
};
|
|
2412
2432
|
let response;
|
|
2413
|
-
|
|
2414
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2433
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2415
2434
|
switch (errorCode) {
|
|
2416
2435
|
case "InternalException":
|
|
2417
2436
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -2424,10 +2443,12 @@ const deserializeAws_restJson1DescribeStandardsCommandError = async (output, con
|
|
|
2424
2443
|
throw await deserializeAws_restJson1InvalidInputExceptionResponse(parsedOutput, context);
|
|
2425
2444
|
default:
|
|
2426
2445
|
const parsedBody = parsedOutput.body;
|
|
2446
|
+
const $metadata = deserializeMetadata(output);
|
|
2447
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2427
2448
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
2428
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2449
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2429
2450
|
$fault: "client",
|
|
2430
|
-
$metadata
|
|
2451
|
+
$metadata,
|
|
2431
2452
|
});
|
|
2432
2453
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2433
2454
|
}
|
|
@@ -2457,8 +2478,7 @@ const deserializeAws_restJson1DescribeStandardsControlsCommandError = async (out
|
|
|
2457
2478
|
body: await parseBody(output.body, context),
|
|
2458
2479
|
};
|
|
2459
2480
|
let response;
|
|
2460
|
-
|
|
2461
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2481
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2462
2482
|
switch (errorCode) {
|
|
2463
2483
|
case "InternalException":
|
|
2464
2484
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -2474,10 +2494,12 @@ const deserializeAws_restJson1DescribeStandardsControlsCommandError = async (out
|
|
|
2474
2494
|
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
2475
2495
|
default:
|
|
2476
2496
|
const parsedBody = parsedOutput.body;
|
|
2497
|
+
const $metadata = deserializeMetadata(output);
|
|
2498
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2477
2499
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
2478
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2500
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2479
2501
|
$fault: "client",
|
|
2480
|
-
$metadata
|
|
2502
|
+
$metadata,
|
|
2481
2503
|
});
|
|
2482
2504
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2483
2505
|
}
|
|
@@ -2499,8 +2521,7 @@ const deserializeAws_restJson1DisableImportFindingsForProductCommandError = asyn
|
|
|
2499
2521
|
body: await parseBody(output.body, context),
|
|
2500
2522
|
};
|
|
2501
2523
|
let response;
|
|
2502
|
-
|
|
2503
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2524
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2504
2525
|
switch (errorCode) {
|
|
2505
2526
|
case "InternalException":
|
|
2506
2527
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -2519,10 +2540,12 @@ const deserializeAws_restJson1DisableImportFindingsForProductCommandError = asyn
|
|
|
2519
2540
|
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
2520
2541
|
default:
|
|
2521
2542
|
const parsedBody = parsedOutput.body;
|
|
2543
|
+
const $metadata = deserializeMetadata(output);
|
|
2544
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2522
2545
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
2523
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2546
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2524
2547
|
$fault: "client",
|
|
2525
|
-
$metadata
|
|
2548
|
+
$metadata,
|
|
2526
2549
|
});
|
|
2527
2550
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2528
2551
|
}
|
|
@@ -2544,8 +2567,7 @@ const deserializeAws_restJson1DisableOrganizationAdminAccountCommandError = asyn
|
|
|
2544
2567
|
body: await parseBody(output.body, context),
|
|
2545
2568
|
};
|
|
2546
2569
|
let response;
|
|
2547
|
-
|
|
2548
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2570
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2549
2571
|
switch (errorCode) {
|
|
2550
2572
|
case "InternalException":
|
|
2551
2573
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -2561,10 +2583,12 @@ const deserializeAws_restJson1DisableOrganizationAdminAccountCommandError = asyn
|
|
|
2561
2583
|
throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
|
|
2562
2584
|
default:
|
|
2563
2585
|
const parsedBody = parsedOutput.body;
|
|
2586
|
+
const $metadata = deserializeMetadata(output);
|
|
2587
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2564
2588
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
2565
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2589
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2566
2590
|
$fault: "client",
|
|
2567
|
-
$metadata
|
|
2591
|
+
$metadata,
|
|
2568
2592
|
});
|
|
2569
2593
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2570
2594
|
}
|
|
@@ -2586,8 +2610,7 @@ const deserializeAws_restJson1DisableSecurityHubCommandError = async (output, co
|
|
|
2586
2610
|
body: await parseBody(output.body, context),
|
|
2587
2611
|
};
|
|
2588
2612
|
let response;
|
|
2589
|
-
|
|
2590
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2613
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2591
2614
|
switch (errorCode) {
|
|
2592
2615
|
case "InternalException":
|
|
2593
2616
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -2603,10 +2626,12 @@ const deserializeAws_restJson1DisableSecurityHubCommandError = async (output, co
|
|
|
2603
2626
|
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
2604
2627
|
default:
|
|
2605
2628
|
const parsedBody = parsedOutput.body;
|
|
2629
|
+
const $metadata = deserializeMetadata(output);
|
|
2630
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2606
2631
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
2607
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2632
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2608
2633
|
$fault: "client",
|
|
2609
|
-
$metadata
|
|
2634
|
+
$metadata,
|
|
2610
2635
|
});
|
|
2611
2636
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2612
2637
|
}
|
|
@@ -2628,8 +2653,7 @@ const deserializeAws_restJson1DisassociateFromAdministratorAccountCommandError =
|
|
|
2628
2653
|
body: await parseBody(output.body, context),
|
|
2629
2654
|
};
|
|
2630
2655
|
let response;
|
|
2631
|
-
|
|
2632
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2656
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2633
2657
|
switch (errorCode) {
|
|
2634
2658
|
case "InternalException":
|
|
2635
2659
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -2648,10 +2672,12 @@ const deserializeAws_restJson1DisassociateFromAdministratorAccountCommandError =
|
|
|
2648
2672
|
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
2649
2673
|
default:
|
|
2650
2674
|
const parsedBody = parsedOutput.body;
|
|
2675
|
+
const $metadata = deserializeMetadata(output);
|
|
2676
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2651
2677
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
2652
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2678
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2653
2679
|
$fault: "client",
|
|
2654
|
-
$metadata
|
|
2680
|
+
$metadata,
|
|
2655
2681
|
});
|
|
2656
2682
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2657
2683
|
}
|
|
@@ -2673,8 +2699,7 @@ const deserializeAws_restJson1DisassociateFromMasterAccountCommandError = async
|
|
|
2673
2699
|
body: await parseBody(output.body, context),
|
|
2674
2700
|
};
|
|
2675
2701
|
let response;
|
|
2676
|
-
|
|
2677
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2702
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2678
2703
|
switch (errorCode) {
|
|
2679
2704
|
case "InternalException":
|
|
2680
2705
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -2693,10 +2718,12 @@ const deserializeAws_restJson1DisassociateFromMasterAccountCommandError = async
|
|
|
2693
2718
|
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
2694
2719
|
default:
|
|
2695
2720
|
const parsedBody = parsedOutput.body;
|
|
2721
|
+
const $metadata = deserializeMetadata(output);
|
|
2722
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2696
2723
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
2697
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2724
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2698
2725
|
$fault: "client",
|
|
2699
|
-
$metadata
|
|
2726
|
+
$metadata,
|
|
2700
2727
|
});
|
|
2701
2728
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2702
2729
|
}
|
|
@@ -2718,8 +2745,7 @@ const deserializeAws_restJson1DisassociateMembersCommandError = async (output, c
|
|
|
2718
2745
|
body: await parseBody(output.body, context),
|
|
2719
2746
|
};
|
|
2720
2747
|
let response;
|
|
2721
|
-
|
|
2722
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2748
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2723
2749
|
switch (errorCode) {
|
|
2724
2750
|
case "InternalException":
|
|
2725
2751
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -2738,10 +2764,12 @@ const deserializeAws_restJson1DisassociateMembersCommandError = async (output, c
|
|
|
2738
2764
|
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
2739
2765
|
default:
|
|
2740
2766
|
const parsedBody = parsedOutput.body;
|
|
2767
|
+
const $metadata = deserializeMetadata(output);
|
|
2768
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2741
2769
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
2742
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2770
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2743
2771
|
$fault: "client",
|
|
2744
|
-
$metadata
|
|
2772
|
+
$metadata,
|
|
2745
2773
|
});
|
|
2746
2774
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2747
2775
|
}
|
|
@@ -2767,8 +2795,7 @@ const deserializeAws_restJson1EnableImportFindingsForProductCommandError = async
|
|
|
2767
2795
|
body: await parseBody(output.body, context),
|
|
2768
2796
|
};
|
|
2769
2797
|
let response;
|
|
2770
|
-
|
|
2771
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2798
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2772
2799
|
switch (errorCode) {
|
|
2773
2800
|
case "InternalException":
|
|
2774
2801
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -2787,10 +2814,12 @@ const deserializeAws_restJson1EnableImportFindingsForProductCommandError = async
|
|
|
2787
2814
|
throw await deserializeAws_restJson1ResourceConflictExceptionResponse(parsedOutput, context);
|
|
2788
2815
|
default:
|
|
2789
2816
|
const parsedBody = parsedOutput.body;
|
|
2817
|
+
const $metadata = deserializeMetadata(output);
|
|
2818
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2790
2819
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
2791
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2820
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2792
2821
|
$fault: "client",
|
|
2793
|
-
$metadata
|
|
2822
|
+
$metadata,
|
|
2794
2823
|
});
|
|
2795
2824
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2796
2825
|
}
|
|
@@ -2812,8 +2841,7 @@ const deserializeAws_restJson1EnableOrganizationAdminAccountCommandError = async
|
|
|
2812
2841
|
body: await parseBody(output.body, context),
|
|
2813
2842
|
};
|
|
2814
2843
|
let response;
|
|
2815
|
-
|
|
2816
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2844
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2817
2845
|
switch (errorCode) {
|
|
2818
2846
|
case "InternalException":
|
|
2819
2847
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -2829,10 +2857,12 @@ const deserializeAws_restJson1EnableOrganizationAdminAccountCommandError = async
|
|
|
2829
2857
|
throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
|
|
2830
2858
|
default:
|
|
2831
2859
|
const parsedBody = parsedOutput.body;
|
|
2860
|
+
const $metadata = deserializeMetadata(output);
|
|
2861
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2832
2862
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
2833
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2863
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2834
2864
|
$fault: "client",
|
|
2835
|
-
$metadata
|
|
2865
|
+
$metadata,
|
|
2836
2866
|
});
|
|
2837
2867
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2838
2868
|
}
|
|
@@ -2854,8 +2884,7 @@ const deserializeAws_restJson1EnableSecurityHubCommandError = async (output, con
|
|
|
2854
2884
|
body: await parseBody(output.body, context),
|
|
2855
2885
|
};
|
|
2856
2886
|
let response;
|
|
2857
|
-
|
|
2858
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2887
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2859
2888
|
switch (errorCode) {
|
|
2860
2889
|
case "AccessDeniedException":
|
|
2861
2890
|
case "com.amazonaws.securityhub#AccessDeniedException":
|
|
@@ -2874,10 +2903,12 @@ const deserializeAws_restJson1EnableSecurityHubCommandError = async (output, con
|
|
|
2874
2903
|
throw await deserializeAws_restJson1ResourceConflictExceptionResponse(parsedOutput, context);
|
|
2875
2904
|
default:
|
|
2876
2905
|
const parsedBody = parsedOutput.body;
|
|
2906
|
+
const $metadata = deserializeMetadata(output);
|
|
2907
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2877
2908
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
2878
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2909
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2879
2910
|
$fault: "client",
|
|
2880
|
-
$metadata
|
|
2911
|
+
$metadata,
|
|
2881
2912
|
});
|
|
2882
2913
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2883
2914
|
}
|
|
@@ -2903,8 +2934,7 @@ const deserializeAws_restJson1GetAdministratorAccountCommandError = async (outpu
|
|
|
2903
2934
|
body: await parseBody(output.body, context),
|
|
2904
2935
|
};
|
|
2905
2936
|
let response;
|
|
2906
|
-
|
|
2907
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2937
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2908
2938
|
switch (errorCode) {
|
|
2909
2939
|
case "InternalException":
|
|
2910
2940
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -2923,10 +2953,12 @@ const deserializeAws_restJson1GetAdministratorAccountCommandError = async (outpu
|
|
|
2923
2953
|
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
2924
2954
|
default:
|
|
2925
2955
|
const parsedBody = parsedOutput.body;
|
|
2956
|
+
const $metadata = deserializeMetadata(output);
|
|
2957
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2926
2958
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
2927
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2959
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2928
2960
|
$fault: "client",
|
|
2929
|
-
$metadata
|
|
2961
|
+
$metadata,
|
|
2930
2962
|
});
|
|
2931
2963
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2932
2964
|
}
|
|
@@ -2956,8 +2988,7 @@ const deserializeAws_restJson1GetEnabledStandardsCommandError = async (output, c
|
|
|
2956
2988
|
body: await parseBody(output.body, context),
|
|
2957
2989
|
};
|
|
2958
2990
|
let response;
|
|
2959
|
-
|
|
2960
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2991
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2961
2992
|
switch (errorCode) {
|
|
2962
2993
|
case "InternalException":
|
|
2963
2994
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -2973,10 +3004,12 @@ const deserializeAws_restJson1GetEnabledStandardsCommandError = async (output, c
|
|
|
2973
3004
|
throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
|
|
2974
3005
|
default:
|
|
2975
3006
|
const parsedBody = parsedOutput.body;
|
|
3007
|
+
const $metadata = deserializeMetadata(output);
|
|
3008
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2976
3009
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
2977
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3010
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2978
3011
|
$fault: "client",
|
|
2979
|
-
$metadata
|
|
3012
|
+
$metadata,
|
|
2980
3013
|
});
|
|
2981
3014
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2982
3015
|
}
|
|
@@ -3014,8 +3047,7 @@ const deserializeAws_restJson1GetFindingAggregatorCommandError = async (output,
|
|
|
3014
3047
|
body: await parseBody(output.body, context),
|
|
3015
3048
|
};
|
|
3016
3049
|
let response;
|
|
3017
|
-
|
|
3018
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3050
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3019
3051
|
switch (errorCode) {
|
|
3020
3052
|
case "AccessDeniedException":
|
|
3021
3053
|
case "com.amazonaws.securityhub#AccessDeniedException":
|
|
@@ -3037,10 +3069,12 @@ const deserializeAws_restJson1GetFindingAggregatorCommandError = async (output,
|
|
|
3037
3069
|
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
3038
3070
|
default:
|
|
3039
3071
|
const parsedBody = parsedOutput.body;
|
|
3072
|
+
const $metadata = deserializeMetadata(output);
|
|
3073
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3040
3074
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
3041
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3075
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3042
3076
|
$fault: "client",
|
|
3043
|
-
$metadata
|
|
3077
|
+
$metadata,
|
|
3044
3078
|
});
|
|
3045
3079
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3046
3080
|
}
|
|
@@ -3070,8 +3104,7 @@ const deserializeAws_restJson1GetFindingsCommandError = async (output, context)
|
|
|
3070
3104
|
body: await parseBody(output.body, context),
|
|
3071
3105
|
};
|
|
3072
3106
|
let response;
|
|
3073
|
-
|
|
3074
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3107
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3075
3108
|
switch (errorCode) {
|
|
3076
3109
|
case "InternalException":
|
|
3077
3110
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -3087,10 +3120,12 @@ const deserializeAws_restJson1GetFindingsCommandError = async (output, context)
|
|
|
3087
3120
|
throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
|
|
3088
3121
|
default:
|
|
3089
3122
|
const parsedBody = parsedOutput.body;
|
|
3123
|
+
const $metadata = deserializeMetadata(output);
|
|
3124
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3090
3125
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
3091
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3126
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3092
3127
|
$fault: "client",
|
|
3093
|
-
$metadata
|
|
3128
|
+
$metadata,
|
|
3094
3129
|
});
|
|
3095
3130
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3096
3131
|
}
|
|
@@ -3116,8 +3151,7 @@ const deserializeAws_restJson1GetInsightResultsCommandError = async (output, con
|
|
|
3116
3151
|
body: await parseBody(output.body, context),
|
|
3117
3152
|
};
|
|
3118
3153
|
let response;
|
|
3119
|
-
|
|
3120
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3154
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3121
3155
|
switch (errorCode) {
|
|
3122
3156
|
case "InternalException":
|
|
3123
3157
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -3136,10 +3170,12 @@ const deserializeAws_restJson1GetInsightResultsCommandError = async (output, con
|
|
|
3136
3170
|
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
3137
3171
|
default:
|
|
3138
3172
|
const parsedBody = parsedOutput.body;
|
|
3173
|
+
const $metadata = deserializeMetadata(output);
|
|
3174
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3139
3175
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
3140
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3176
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3141
3177
|
$fault: "client",
|
|
3142
|
-
$metadata
|
|
3178
|
+
$metadata,
|
|
3143
3179
|
});
|
|
3144
3180
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3145
3181
|
}
|
|
@@ -3169,8 +3205,7 @@ const deserializeAws_restJson1GetInsightsCommandError = async (output, context)
|
|
|
3169
3205
|
body: await parseBody(output.body, context),
|
|
3170
3206
|
};
|
|
3171
3207
|
let response;
|
|
3172
|
-
|
|
3173
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3208
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3174
3209
|
switch (errorCode) {
|
|
3175
3210
|
case "InternalException":
|
|
3176
3211
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -3189,10 +3224,12 @@ const deserializeAws_restJson1GetInsightsCommandError = async (output, context)
|
|
|
3189
3224
|
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
3190
3225
|
default:
|
|
3191
3226
|
const parsedBody = parsedOutput.body;
|
|
3227
|
+
const $metadata = deserializeMetadata(output);
|
|
3228
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3192
3229
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
3193
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3230
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3194
3231
|
$fault: "client",
|
|
3195
|
-
$metadata
|
|
3232
|
+
$metadata,
|
|
3196
3233
|
});
|
|
3197
3234
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3198
3235
|
}
|
|
@@ -3218,8 +3255,7 @@ const deserializeAws_restJson1GetInvitationsCountCommandError = async (output, c
|
|
|
3218
3255
|
body: await parseBody(output.body, context),
|
|
3219
3256
|
};
|
|
3220
3257
|
let response;
|
|
3221
|
-
|
|
3222
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3258
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3223
3259
|
switch (errorCode) {
|
|
3224
3260
|
case "InternalException":
|
|
3225
3261
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -3235,10 +3271,12 @@ const deserializeAws_restJson1GetInvitationsCountCommandError = async (output, c
|
|
|
3235
3271
|
throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
|
|
3236
3272
|
default:
|
|
3237
3273
|
const parsedBody = parsedOutput.body;
|
|
3274
|
+
const $metadata = deserializeMetadata(output);
|
|
3275
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3238
3276
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
3239
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3277
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3240
3278
|
$fault: "client",
|
|
3241
|
-
$metadata
|
|
3279
|
+
$metadata,
|
|
3242
3280
|
});
|
|
3243
3281
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3244
3282
|
}
|
|
@@ -3264,8 +3302,7 @@ const deserializeAws_restJson1GetMasterAccountCommandError = async (output, cont
|
|
|
3264
3302
|
body: await parseBody(output.body, context),
|
|
3265
3303
|
};
|
|
3266
3304
|
let response;
|
|
3267
|
-
|
|
3268
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3305
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3269
3306
|
switch (errorCode) {
|
|
3270
3307
|
case "InternalException":
|
|
3271
3308
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -3284,10 +3321,12 @@ const deserializeAws_restJson1GetMasterAccountCommandError = async (output, cont
|
|
|
3284
3321
|
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
3285
3322
|
default:
|
|
3286
3323
|
const parsedBody = parsedOutput.body;
|
|
3324
|
+
const $metadata = deserializeMetadata(output);
|
|
3325
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3287
3326
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
3288
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3327
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3289
3328
|
$fault: "client",
|
|
3290
|
-
$metadata
|
|
3329
|
+
$metadata,
|
|
3291
3330
|
});
|
|
3292
3331
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3293
3332
|
}
|
|
@@ -3317,8 +3356,7 @@ const deserializeAws_restJson1GetMembersCommandError = async (output, context) =
|
|
|
3317
3356
|
body: await parseBody(output.body, context),
|
|
3318
3357
|
};
|
|
3319
3358
|
let response;
|
|
3320
|
-
|
|
3321
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3359
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3322
3360
|
switch (errorCode) {
|
|
3323
3361
|
case "InternalException":
|
|
3324
3362
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -3337,10 +3375,12 @@ const deserializeAws_restJson1GetMembersCommandError = async (output, context) =
|
|
|
3337
3375
|
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
3338
3376
|
default:
|
|
3339
3377
|
const parsedBody = parsedOutput.body;
|
|
3378
|
+
const $metadata = deserializeMetadata(output);
|
|
3379
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3340
3380
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
3341
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3381
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3342
3382
|
$fault: "client",
|
|
3343
|
-
$metadata
|
|
3383
|
+
$metadata,
|
|
3344
3384
|
});
|
|
3345
3385
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3346
3386
|
}
|
|
@@ -3366,8 +3406,7 @@ const deserializeAws_restJson1InviteMembersCommandError = async (output, context
|
|
|
3366
3406
|
body: await parseBody(output.body, context),
|
|
3367
3407
|
};
|
|
3368
3408
|
let response;
|
|
3369
|
-
|
|
3370
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3409
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3371
3410
|
switch (errorCode) {
|
|
3372
3411
|
case "InternalException":
|
|
3373
3412
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -3386,10 +3425,12 @@ const deserializeAws_restJson1InviteMembersCommandError = async (output, context
|
|
|
3386
3425
|
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
3387
3426
|
default:
|
|
3388
3427
|
const parsedBody = parsedOutput.body;
|
|
3428
|
+
const $metadata = deserializeMetadata(output);
|
|
3429
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3389
3430
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
3390
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3431
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3391
3432
|
$fault: "client",
|
|
3392
|
-
$metadata
|
|
3433
|
+
$metadata,
|
|
3393
3434
|
});
|
|
3394
3435
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3395
3436
|
}
|
|
@@ -3419,8 +3460,7 @@ const deserializeAws_restJson1ListEnabledProductsForImportCommandError = async (
|
|
|
3419
3460
|
body: await parseBody(output.body, context),
|
|
3420
3461
|
};
|
|
3421
3462
|
let response;
|
|
3422
|
-
|
|
3423
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3463
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3424
3464
|
switch (errorCode) {
|
|
3425
3465
|
case "InternalException":
|
|
3426
3466
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -3433,10 +3473,12 @@ const deserializeAws_restJson1ListEnabledProductsForImportCommandError = async (
|
|
|
3433
3473
|
throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
|
|
3434
3474
|
default:
|
|
3435
3475
|
const parsedBody = parsedOutput.body;
|
|
3476
|
+
const $metadata = deserializeMetadata(output);
|
|
3477
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3436
3478
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
3437
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3479
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3438
3480
|
$fault: "client",
|
|
3439
|
-
$metadata
|
|
3481
|
+
$metadata,
|
|
3440
3482
|
});
|
|
3441
3483
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3442
3484
|
}
|
|
@@ -3466,8 +3508,7 @@ const deserializeAws_restJson1ListFindingAggregatorsCommandError = async (output
|
|
|
3466
3508
|
body: await parseBody(output.body, context),
|
|
3467
3509
|
};
|
|
3468
3510
|
let response;
|
|
3469
|
-
|
|
3470
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3511
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3471
3512
|
switch (errorCode) {
|
|
3472
3513
|
case "AccessDeniedException":
|
|
3473
3514
|
case "com.amazonaws.securityhub#AccessDeniedException":
|
|
@@ -3486,10 +3527,12 @@ const deserializeAws_restJson1ListFindingAggregatorsCommandError = async (output
|
|
|
3486
3527
|
throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
|
|
3487
3528
|
default:
|
|
3488
3529
|
const parsedBody = parsedOutput.body;
|
|
3530
|
+
const $metadata = deserializeMetadata(output);
|
|
3531
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3489
3532
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
3490
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3533
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3491
3534
|
$fault: "client",
|
|
3492
|
-
$metadata
|
|
3535
|
+
$metadata,
|
|
3493
3536
|
});
|
|
3494
3537
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3495
3538
|
}
|
|
@@ -3519,8 +3562,7 @@ const deserializeAws_restJson1ListInvitationsCommandError = async (output, conte
|
|
|
3519
3562
|
body: await parseBody(output.body, context),
|
|
3520
3563
|
};
|
|
3521
3564
|
let response;
|
|
3522
|
-
|
|
3523
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3565
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3524
3566
|
switch (errorCode) {
|
|
3525
3567
|
case "InternalException":
|
|
3526
3568
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -3536,10 +3578,12 @@ const deserializeAws_restJson1ListInvitationsCommandError = async (output, conte
|
|
|
3536
3578
|
throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
|
|
3537
3579
|
default:
|
|
3538
3580
|
const parsedBody = parsedOutput.body;
|
|
3581
|
+
const $metadata = deserializeMetadata(output);
|
|
3582
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3539
3583
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
3540
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3584
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3541
3585
|
$fault: "client",
|
|
3542
|
-
$metadata
|
|
3586
|
+
$metadata,
|
|
3543
3587
|
});
|
|
3544
3588
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3545
3589
|
}
|
|
@@ -3569,8 +3613,7 @@ const deserializeAws_restJson1ListMembersCommandError = async (output, context)
|
|
|
3569
3613
|
body: await parseBody(output.body, context),
|
|
3570
3614
|
};
|
|
3571
3615
|
let response;
|
|
3572
|
-
|
|
3573
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3616
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3574
3617
|
switch (errorCode) {
|
|
3575
3618
|
case "InternalException":
|
|
3576
3619
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -3586,10 +3629,12 @@ const deserializeAws_restJson1ListMembersCommandError = async (output, context)
|
|
|
3586
3629
|
throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
|
|
3587
3630
|
default:
|
|
3588
3631
|
const parsedBody = parsedOutput.body;
|
|
3632
|
+
const $metadata = deserializeMetadata(output);
|
|
3633
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3589
3634
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
3590
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3635
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3591
3636
|
$fault: "client",
|
|
3592
|
-
$metadata
|
|
3637
|
+
$metadata,
|
|
3593
3638
|
});
|
|
3594
3639
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3595
3640
|
}
|
|
@@ -3619,8 +3664,7 @@ const deserializeAws_restJson1ListOrganizationAdminAccountsCommandError = async
|
|
|
3619
3664
|
body: await parseBody(output.body, context),
|
|
3620
3665
|
};
|
|
3621
3666
|
let response;
|
|
3622
|
-
|
|
3623
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3667
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3624
3668
|
switch (errorCode) {
|
|
3625
3669
|
case "InternalException":
|
|
3626
3670
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -3636,10 +3680,12 @@ const deserializeAws_restJson1ListOrganizationAdminAccountsCommandError = async
|
|
|
3636
3680
|
throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
|
|
3637
3681
|
default:
|
|
3638
3682
|
const parsedBody = parsedOutput.body;
|
|
3683
|
+
const $metadata = deserializeMetadata(output);
|
|
3684
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3639
3685
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
3640
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3686
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3641
3687
|
$fault: "client",
|
|
3642
|
-
$metadata
|
|
3688
|
+
$metadata,
|
|
3643
3689
|
});
|
|
3644
3690
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3645
3691
|
}
|
|
@@ -3665,8 +3711,7 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
3665
3711
|
body: await parseBody(output.body, context),
|
|
3666
3712
|
};
|
|
3667
3713
|
let response;
|
|
3668
|
-
|
|
3669
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3714
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3670
3715
|
switch (errorCode) {
|
|
3671
3716
|
case "InternalException":
|
|
3672
3717
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -3679,10 +3724,12 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
3679
3724
|
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
3680
3725
|
default:
|
|
3681
3726
|
const parsedBody = parsedOutput.body;
|
|
3727
|
+
const $metadata = deserializeMetadata(output);
|
|
3728
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3682
3729
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
3683
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3730
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3684
3731
|
$fault: "client",
|
|
3685
|
-
$metadata
|
|
3732
|
+
$metadata,
|
|
3686
3733
|
});
|
|
3687
3734
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3688
3735
|
}
|
|
@@ -3704,8 +3751,7 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
3704
3751
|
body: await parseBody(output.body, context),
|
|
3705
3752
|
};
|
|
3706
3753
|
let response;
|
|
3707
|
-
|
|
3708
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3754
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3709
3755
|
switch (errorCode) {
|
|
3710
3756
|
case "InternalException":
|
|
3711
3757
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -3718,10 +3764,12 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
3718
3764
|
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
3719
3765
|
default:
|
|
3720
3766
|
const parsedBody = parsedOutput.body;
|
|
3767
|
+
const $metadata = deserializeMetadata(output);
|
|
3768
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3721
3769
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
3722
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3770
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3723
3771
|
$fault: "client",
|
|
3724
|
-
$metadata
|
|
3772
|
+
$metadata,
|
|
3725
3773
|
});
|
|
3726
3774
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3727
3775
|
}
|
|
@@ -3743,8 +3791,7 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
3743
3791
|
body: await parseBody(output.body, context),
|
|
3744
3792
|
};
|
|
3745
3793
|
let response;
|
|
3746
|
-
|
|
3747
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3794
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3748
3795
|
switch (errorCode) {
|
|
3749
3796
|
case "InternalException":
|
|
3750
3797
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -3757,10 +3804,12 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
3757
3804
|
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
3758
3805
|
default:
|
|
3759
3806
|
const parsedBody = parsedOutput.body;
|
|
3807
|
+
const $metadata = deserializeMetadata(output);
|
|
3808
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3760
3809
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
3761
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3810
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3762
3811
|
$fault: "client",
|
|
3763
|
-
$metadata
|
|
3812
|
+
$metadata,
|
|
3764
3813
|
});
|
|
3765
3814
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3766
3815
|
}
|
|
@@ -3782,8 +3831,7 @@ const deserializeAws_restJson1UpdateActionTargetCommandError = async (output, co
|
|
|
3782
3831
|
body: await parseBody(output.body, context),
|
|
3783
3832
|
};
|
|
3784
3833
|
let response;
|
|
3785
|
-
|
|
3786
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3834
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3787
3835
|
switch (errorCode) {
|
|
3788
3836
|
case "InternalException":
|
|
3789
3837
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -3799,10 +3847,12 @@ const deserializeAws_restJson1UpdateActionTargetCommandError = async (output, co
|
|
|
3799
3847
|
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
3800
3848
|
default:
|
|
3801
3849
|
const parsedBody = parsedOutput.body;
|
|
3850
|
+
const $metadata = deserializeMetadata(output);
|
|
3851
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3802
3852
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
3803
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3853
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3804
3854
|
$fault: "client",
|
|
3805
|
-
$metadata
|
|
3855
|
+
$metadata,
|
|
3806
3856
|
});
|
|
3807
3857
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3808
3858
|
}
|
|
@@ -3840,8 +3890,7 @@ const deserializeAws_restJson1UpdateFindingAggregatorCommandError = async (outpu
|
|
|
3840
3890
|
body: await parseBody(output.body, context),
|
|
3841
3891
|
};
|
|
3842
3892
|
let response;
|
|
3843
|
-
|
|
3844
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3893
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3845
3894
|
switch (errorCode) {
|
|
3846
3895
|
case "AccessDeniedException":
|
|
3847
3896
|
case "com.amazonaws.securityhub#AccessDeniedException":
|
|
@@ -3863,10 +3912,12 @@ const deserializeAws_restJson1UpdateFindingAggregatorCommandError = async (outpu
|
|
|
3863
3912
|
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
3864
3913
|
default:
|
|
3865
3914
|
const parsedBody = parsedOutput.body;
|
|
3915
|
+
const $metadata = deserializeMetadata(output);
|
|
3916
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3866
3917
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
3867
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3918
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3868
3919
|
$fault: "client",
|
|
3869
|
-
$metadata
|
|
3920
|
+
$metadata,
|
|
3870
3921
|
});
|
|
3871
3922
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3872
3923
|
}
|
|
@@ -3888,8 +3939,7 @@ const deserializeAws_restJson1UpdateFindingsCommandError = async (output, contex
|
|
|
3888
3939
|
body: await parseBody(output.body, context),
|
|
3889
3940
|
};
|
|
3890
3941
|
let response;
|
|
3891
|
-
|
|
3892
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3942
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3893
3943
|
switch (errorCode) {
|
|
3894
3944
|
case "InternalException":
|
|
3895
3945
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -3908,10 +3958,12 @@ const deserializeAws_restJson1UpdateFindingsCommandError = async (output, contex
|
|
|
3908
3958
|
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
3909
3959
|
default:
|
|
3910
3960
|
const parsedBody = parsedOutput.body;
|
|
3961
|
+
const $metadata = deserializeMetadata(output);
|
|
3962
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3911
3963
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
3912
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3964
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3913
3965
|
$fault: "client",
|
|
3914
|
-
$metadata
|
|
3966
|
+
$metadata,
|
|
3915
3967
|
});
|
|
3916
3968
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3917
3969
|
}
|
|
@@ -3933,8 +3985,7 @@ const deserializeAws_restJson1UpdateInsightCommandError = async (output, context
|
|
|
3933
3985
|
body: await parseBody(output.body, context),
|
|
3934
3986
|
};
|
|
3935
3987
|
let response;
|
|
3936
|
-
|
|
3937
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3988
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3938
3989
|
switch (errorCode) {
|
|
3939
3990
|
case "InternalException":
|
|
3940
3991
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -3953,10 +4004,12 @@ const deserializeAws_restJson1UpdateInsightCommandError = async (output, context
|
|
|
3953
4004
|
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
3954
4005
|
default:
|
|
3955
4006
|
const parsedBody = parsedOutput.body;
|
|
4007
|
+
const $metadata = deserializeMetadata(output);
|
|
4008
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3956
4009
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
3957
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
4010
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3958
4011
|
$fault: "client",
|
|
3959
|
-
$metadata
|
|
4012
|
+
$metadata,
|
|
3960
4013
|
});
|
|
3961
4014
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3962
4015
|
}
|
|
@@ -3978,8 +4031,7 @@ const deserializeAws_restJson1UpdateOrganizationConfigurationCommandError = asyn
|
|
|
3978
4031
|
body: await parseBody(output.body, context),
|
|
3979
4032
|
};
|
|
3980
4033
|
let response;
|
|
3981
|
-
|
|
3982
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
4034
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3983
4035
|
switch (errorCode) {
|
|
3984
4036
|
case "InternalException":
|
|
3985
4037
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -3995,10 +4047,12 @@ const deserializeAws_restJson1UpdateOrganizationConfigurationCommandError = asyn
|
|
|
3995
4047
|
throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
|
|
3996
4048
|
default:
|
|
3997
4049
|
const parsedBody = parsedOutput.body;
|
|
4050
|
+
const $metadata = deserializeMetadata(output);
|
|
4051
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3998
4052
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
3999
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
4053
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
4000
4054
|
$fault: "client",
|
|
4001
|
-
$metadata
|
|
4055
|
+
$metadata,
|
|
4002
4056
|
});
|
|
4003
4057
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
4004
4058
|
}
|
|
@@ -4020,8 +4074,7 @@ const deserializeAws_restJson1UpdateSecurityHubConfigurationCommandError = async
|
|
|
4020
4074
|
body: await parseBody(output.body, context),
|
|
4021
4075
|
};
|
|
4022
4076
|
let response;
|
|
4023
|
-
|
|
4024
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
4077
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
4025
4078
|
switch (errorCode) {
|
|
4026
4079
|
case "InternalException":
|
|
4027
4080
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -4040,10 +4093,12 @@ const deserializeAws_restJson1UpdateSecurityHubConfigurationCommandError = async
|
|
|
4040
4093
|
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
4041
4094
|
default:
|
|
4042
4095
|
const parsedBody = parsedOutput.body;
|
|
4096
|
+
const $metadata = deserializeMetadata(output);
|
|
4097
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
4043
4098
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
4044
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
4099
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
4045
4100
|
$fault: "client",
|
|
4046
|
-
$metadata
|
|
4101
|
+
$metadata,
|
|
4047
4102
|
});
|
|
4048
4103
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
4049
4104
|
}
|
|
@@ -4065,8 +4120,7 @@ const deserializeAws_restJson1UpdateStandardsControlCommandError = async (output
|
|
|
4065
4120
|
body: await parseBody(output.body, context),
|
|
4066
4121
|
};
|
|
4067
4122
|
let response;
|
|
4068
|
-
|
|
4069
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
4123
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
4070
4124
|
switch (errorCode) {
|
|
4071
4125
|
case "InternalException":
|
|
4072
4126
|
case "com.amazonaws.securityhub#InternalException":
|
|
@@ -4082,10 +4136,12 @@ const deserializeAws_restJson1UpdateStandardsControlCommandError = async (output
|
|
|
4082
4136
|
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
4083
4137
|
default:
|
|
4084
4138
|
const parsedBody = parsedOutput.body;
|
|
4139
|
+
const $metadata = deserializeMetadata(output);
|
|
4140
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
4085
4141
|
response = new SecurityHubServiceException_1.SecurityHubServiceException({
|
|
4086
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
4142
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
4087
4143
|
$fault: "client",
|
|
4088
|
-
$metadata
|
|
4144
|
+
$metadata,
|
|
4089
4145
|
});
|
|
4090
4146
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
4091
4147
|
}
|
|
@@ -20484,5 +20540,4 @@ const loadRestJsonErrorCode = (output, data) => {
|
|
|
20484
20540
|
if (data["__type"] !== undefined) {
|
|
20485
20541
|
return sanitizeErrorCode(data["__type"]);
|
|
20486
20542
|
}
|
|
20487
|
-
return "";
|
|
20488
20543
|
};
|