@aws-sdk/client-amplifybackend 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 +155 -125
- package/dist-es/protocols/Aws_restJson1.js +155 -125
- package/package.json +6 -6
|
@@ -1262,8 +1262,7 @@ const deserializeAws_restJson1CloneBackendCommandError = async (output, context)
|
|
|
1262
1262
|
body: await parseBody(output.body, context),
|
|
1263
1263
|
};
|
|
1264
1264
|
let response;
|
|
1265
|
-
|
|
1266
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1265
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1267
1266
|
switch (errorCode) {
|
|
1268
1267
|
case "BadRequestException":
|
|
1269
1268
|
case "com.amazonaws.amplifybackend#BadRequestException":
|
|
@@ -1279,10 +1278,12 @@ const deserializeAws_restJson1CloneBackendCommandError = async (output, context)
|
|
|
1279
1278
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1280
1279
|
default:
|
|
1281
1280
|
const parsedBody = parsedOutput.body;
|
|
1281
|
+
const $metadata = deserializeMetadata(output);
|
|
1282
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1282
1283
|
response = new AmplifyBackendServiceException_1.AmplifyBackendServiceException({
|
|
1283
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1284
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1284
1285
|
$fault: "client",
|
|
1285
|
-
$metadata
|
|
1286
|
+
$metadata,
|
|
1286
1287
|
});
|
|
1287
1288
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1288
1289
|
}
|
|
@@ -1328,8 +1329,7 @@ const deserializeAws_restJson1CreateBackendCommandError = async (output, context
|
|
|
1328
1329
|
body: await parseBody(output.body, context),
|
|
1329
1330
|
};
|
|
1330
1331
|
let response;
|
|
1331
|
-
|
|
1332
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1332
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1333
1333
|
switch (errorCode) {
|
|
1334
1334
|
case "BadRequestException":
|
|
1335
1335
|
case "com.amazonaws.amplifybackend#BadRequestException":
|
|
@@ -1345,10 +1345,12 @@ const deserializeAws_restJson1CreateBackendCommandError = async (output, context
|
|
|
1345
1345
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1346
1346
|
default:
|
|
1347
1347
|
const parsedBody = parsedOutput.body;
|
|
1348
|
+
const $metadata = deserializeMetadata(output);
|
|
1349
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1348
1350
|
response = new AmplifyBackendServiceException_1.AmplifyBackendServiceException({
|
|
1349
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1351
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1350
1352
|
$fault: "client",
|
|
1351
|
-
$metadata
|
|
1353
|
+
$metadata,
|
|
1352
1354
|
});
|
|
1353
1355
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1354
1356
|
}
|
|
@@ -1394,8 +1396,7 @@ const deserializeAws_restJson1CreateBackendAPICommandError = async (output, cont
|
|
|
1394
1396
|
body: await parseBody(output.body, context),
|
|
1395
1397
|
};
|
|
1396
1398
|
let response;
|
|
1397
|
-
|
|
1398
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1399
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1399
1400
|
switch (errorCode) {
|
|
1400
1401
|
case "BadRequestException":
|
|
1401
1402
|
case "com.amazonaws.amplifybackend#BadRequestException":
|
|
@@ -1411,10 +1412,12 @@ const deserializeAws_restJson1CreateBackendAPICommandError = async (output, cont
|
|
|
1411
1412
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1412
1413
|
default:
|
|
1413
1414
|
const parsedBody = parsedOutput.body;
|
|
1415
|
+
const $metadata = deserializeMetadata(output);
|
|
1416
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1414
1417
|
response = new AmplifyBackendServiceException_1.AmplifyBackendServiceException({
|
|
1415
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1418
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1416
1419
|
$fault: "client",
|
|
1417
|
-
$metadata
|
|
1420
|
+
$metadata,
|
|
1418
1421
|
});
|
|
1419
1422
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1420
1423
|
}
|
|
@@ -1460,8 +1463,7 @@ const deserializeAws_restJson1CreateBackendAuthCommandError = async (output, con
|
|
|
1460
1463
|
body: await parseBody(output.body, context),
|
|
1461
1464
|
};
|
|
1462
1465
|
let response;
|
|
1463
|
-
|
|
1464
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1466
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1465
1467
|
switch (errorCode) {
|
|
1466
1468
|
case "BadRequestException":
|
|
1467
1469
|
case "com.amazonaws.amplifybackend#BadRequestException":
|
|
@@ -1477,10 +1479,12 @@ const deserializeAws_restJson1CreateBackendAuthCommandError = async (output, con
|
|
|
1477
1479
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1478
1480
|
default:
|
|
1479
1481
|
const parsedBody = parsedOutput.body;
|
|
1482
|
+
const $metadata = deserializeMetadata(output);
|
|
1483
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1480
1484
|
response = new AmplifyBackendServiceException_1.AmplifyBackendServiceException({
|
|
1481
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1485
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1482
1486
|
$fault: "client",
|
|
1483
|
-
$metadata
|
|
1487
|
+
$metadata,
|
|
1484
1488
|
});
|
|
1485
1489
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1486
1490
|
}
|
|
@@ -1518,8 +1522,7 @@ const deserializeAws_restJson1CreateBackendConfigCommandError = async (output, c
|
|
|
1518
1522
|
body: await parseBody(output.body, context),
|
|
1519
1523
|
};
|
|
1520
1524
|
let response;
|
|
1521
|
-
|
|
1522
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1525
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1523
1526
|
switch (errorCode) {
|
|
1524
1527
|
case "BadRequestException":
|
|
1525
1528
|
case "com.amazonaws.amplifybackend#BadRequestException":
|
|
@@ -1535,10 +1538,12 @@ const deserializeAws_restJson1CreateBackendConfigCommandError = async (output, c
|
|
|
1535
1538
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1536
1539
|
default:
|
|
1537
1540
|
const parsedBody = parsedOutput.body;
|
|
1541
|
+
const $metadata = deserializeMetadata(output);
|
|
1542
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1538
1543
|
response = new AmplifyBackendServiceException_1.AmplifyBackendServiceException({
|
|
1539
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1544
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1540
1545
|
$fault: "client",
|
|
1541
|
-
$metadata
|
|
1546
|
+
$metadata,
|
|
1542
1547
|
});
|
|
1543
1548
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1544
1549
|
}
|
|
@@ -1576,8 +1581,7 @@ const deserializeAws_restJson1CreateBackendStorageCommandError = async (output,
|
|
|
1576
1581
|
body: await parseBody(output.body, context),
|
|
1577
1582
|
};
|
|
1578
1583
|
let response;
|
|
1579
|
-
|
|
1580
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1584
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1581
1585
|
switch (errorCode) {
|
|
1582
1586
|
case "BadRequestException":
|
|
1583
1587
|
case "com.amazonaws.amplifybackend#BadRequestException":
|
|
@@ -1593,10 +1597,12 @@ const deserializeAws_restJson1CreateBackendStorageCommandError = async (output,
|
|
|
1593
1597
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1594
1598
|
default:
|
|
1595
1599
|
const parsedBody = parsedOutput.body;
|
|
1600
|
+
const $metadata = deserializeMetadata(output);
|
|
1601
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1596
1602
|
response = new AmplifyBackendServiceException_1.AmplifyBackendServiceException({
|
|
1597
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1603
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1598
1604
|
$fault: "client",
|
|
1599
|
-
$metadata
|
|
1605
|
+
$metadata,
|
|
1600
1606
|
});
|
|
1601
1607
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1602
1608
|
}
|
|
@@ -1634,8 +1640,7 @@ const deserializeAws_restJson1CreateTokenCommandError = async (output, context)
|
|
|
1634
1640
|
body: await parseBody(output.body, context),
|
|
1635
1641
|
};
|
|
1636
1642
|
let response;
|
|
1637
|
-
|
|
1638
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1643
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1639
1644
|
switch (errorCode) {
|
|
1640
1645
|
case "BadRequestException":
|
|
1641
1646
|
case "com.amazonaws.amplifybackend#BadRequestException":
|
|
@@ -1651,10 +1656,12 @@ const deserializeAws_restJson1CreateTokenCommandError = async (output, context)
|
|
|
1651
1656
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1652
1657
|
default:
|
|
1653
1658
|
const parsedBody = parsedOutput.body;
|
|
1659
|
+
const $metadata = deserializeMetadata(output);
|
|
1660
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1654
1661
|
response = new AmplifyBackendServiceException_1.AmplifyBackendServiceException({
|
|
1655
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1662
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1656
1663
|
$fault: "client",
|
|
1657
|
-
$metadata
|
|
1664
|
+
$metadata,
|
|
1658
1665
|
});
|
|
1659
1666
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1660
1667
|
}
|
|
@@ -1700,8 +1707,7 @@ const deserializeAws_restJson1DeleteBackendCommandError = async (output, context
|
|
|
1700
1707
|
body: await parseBody(output.body, context),
|
|
1701
1708
|
};
|
|
1702
1709
|
let response;
|
|
1703
|
-
|
|
1704
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1710
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1705
1711
|
switch (errorCode) {
|
|
1706
1712
|
case "BadRequestException":
|
|
1707
1713
|
case "com.amazonaws.amplifybackend#BadRequestException":
|
|
@@ -1717,10 +1723,12 @@ const deserializeAws_restJson1DeleteBackendCommandError = async (output, context
|
|
|
1717
1723
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1718
1724
|
default:
|
|
1719
1725
|
const parsedBody = parsedOutput.body;
|
|
1726
|
+
const $metadata = deserializeMetadata(output);
|
|
1727
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1720
1728
|
response = new AmplifyBackendServiceException_1.AmplifyBackendServiceException({
|
|
1721
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1729
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1722
1730
|
$fault: "client",
|
|
1723
|
-
$metadata
|
|
1731
|
+
$metadata,
|
|
1724
1732
|
});
|
|
1725
1733
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1726
1734
|
}
|
|
@@ -1766,8 +1774,7 @@ const deserializeAws_restJson1DeleteBackendAPICommandError = async (output, cont
|
|
|
1766
1774
|
body: await parseBody(output.body, context),
|
|
1767
1775
|
};
|
|
1768
1776
|
let response;
|
|
1769
|
-
|
|
1770
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1777
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1771
1778
|
switch (errorCode) {
|
|
1772
1779
|
case "BadRequestException":
|
|
1773
1780
|
case "com.amazonaws.amplifybackend#BadRequestException":
|
|
@@ -1783,10 +1790,12 @@ const deserializeAws_restJson1DeleteBackendAPICommandError = async (output, cont
|
|
|
1783
1790
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1784
1791
|
default:
|
|
1785
1792
|
const parsedBody = parsedOutput.body;
|
|
1793
|
+
const $metadata = deserializeMetadata(output);
|
|
1794
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1786
1795
|
response = new AmplifyBackendServiceException_1.AmplifyBackendServiceException({
|
|
1787
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1796
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1788
1797
|
$fault: "client",
|
|
1789
|
-
$metadata
|
|
1798
|
+
$metadata,
|
|
1790
1799
|
});
|
|
1791
1800
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1792
1801
|
}
|
|
@@ -1832,8 +1841,7 @@ const deserializeAws_restJson1DeleteBackendAuthCommandError = async (output, con
|
|
|
1832
1841
|
body: await parseBody(output.body, context),
|
|
1833
1842
|
};
|
|
1834
1843
|
let response;
|
|
1835
|
-
|
|
1836
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1844
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1837
1845
|
switch (errorCode) {
|
|
1838
1846
|
case "BadRequestException":
|
|
1839
1847
|
case "com.amazonaws.amplifybackend#BadRequestException":
|
|
@@ -1849,10 +1857,12 @@ const deserializeAws_restJson1DeleteBackendAuthCommandError = async (output, con
|
|
|
1849
1857
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1850
1858
|
default:
|
|
1851
1859
|
const parsedBody = parsedOutput.body;
|
|
1860
|
+
const $metadata = deserializeMetadata(output);
|
|
1861
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1852
1862
|
response = new AmplifyBackendServiceException_1.AmplifyBackendServiceException({
|
|
1853
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1863
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1854
1864
|
$fault: "client",
|
|
1855
|
-
$metadata
|
|
1865
|
+
$metadata,
|
|
1856
1866
|
});
|
|
1857
1867
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1858
1868
|
}
|
|
@@ -1890,8 +1900,7 @@ const deserializeAws_restJson1DeleteBackendStorageCommandError = async (output,
|
|
|
1890
1900
|
body: await parseBody(output.body, context),
|
|
1891
1901
|
};
|
|
1892
1902
|
let response;
|
|
1893
|
-
|
|
1894
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1903
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1895
1904
|
switch (errorCode) {
|
|
1896
1905
|
case "BadRequestException":
|
|
1897
1906
|
case "com.amazonaws.amplifybackend#BadRequestException":
|
|
@@ -1907,10 +1916,12 @@ const deserializeAws_restJson1DeleteBackendStorageCommandError = async (output,
|
|
|
1907
1916
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1908
1917
|
default:
|
|
1909
1918
|
const parsedBody = parsedOutput.body;
|
|
1919
|
+
const $metadata = deserializeMetadata(output);
|
|
1920
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1910
1921
|
response = new AmplifyBackendServiceException_1.AmplifyBackendServiceException({
|
|
1911
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1922
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1912
1923
|
$fault: "client",
|
|
1913
|
-
$metadata
|
|
1924
|
+
$metadata,
|
|
1914
1925
|
});
|
|
1915
1926
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1916
1927
|
}
|
|
@@ -1936,8 +1947,7 @@ const deserializeAws_restJson1DeleteTokenCommandError = async (output, context)
|
|
|
1936
1947
|
body: await parseBody(output.body, context),
|
|
1937
1948
|
};
|
|
1938
1949
|
let response;
|
|
1939
|
-
|
|
1940
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1950
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1941
1951
|
switch (errorCode) {
|
|
1942
1952
|
case "BadRequestException":
|
|
1943
1953
|
case "com.amazonaws.amplifybackend#BadRequestException":
|
|
@@ -1953,10 +1963,12 @@ const deserializeAws_restJson1DeleteTokenCommandError = async (output, context)
|
|
|
1953
1963
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1954
1964
|
default:
|
|
1955
1965
|
const parsedBody = parsedOutput.body;
|
|
1966
|
+
const $metadata = deserializeMetadata(output);
|
|
1967
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1956
1968
|
response = new AmplifyBackendServiceException_1.AmplifyBackendServiceException({
|
|
1957
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1969
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1958
1970
|
$fault: "client",
|
|
1959
|
-
$metadata
|
|
1971
|
+
$metadata,
|
|
1960
1972
|
});
|
|
1961
1973
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1962
1974
|
}
|
|
@@ -2002,8 +2014,7 @@ const deserializeAws_restJson1GenerateBackendAPIModelsCommandError = async (outp
|
|
|
2002
2014
|
body: await parseBody(output.body, context),
|
|
2003
2015
|
};
|
|
2004
2016
|
let response;
|
|
2005
|
-
|
|
2006
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2017
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2007
2018
|
switch (errorCode) {
|
|
2008
2019
|
case "BadRequestException":
|
|
2009
2020
|
case "com.amazonaws.amplifybackend#BadRequestException":
|
|
@@ -2019,10 +2030,12 @@ const deserializeAws_restJson1GenerateBackendAPIModelsCommandError = async (outp
|
|
|
2019
2030
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(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 AmplifyBackendServiceException_1.AmplifyBackendServiceException({
|
|
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
|
}
|
|
@@ -2072,8 +2085,7 @@ const deserializeAws_restJson1GetBackendCommandError = async (output, context) =
|
|
|
2072
2085
|
body: await parseBody(output.body, context),
|
|
2073
2086
|
};
|
|
2074
2087
|
let response;
|
|
2075
|
-
|
|
2076
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2088
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2077
2089
|
switch (errorCode) {
|
|
2078
2090
|
case "BadRequestException":
|
|
2079
2091
|
case "com.amazonaws.amplifybackend#BadRequestException":
|
|
@@ -2089,10 +2101,12 @@ const deserializeAws_restJson1GetBackendCommandError = async (output, context) =
|
|
|
2089
2101
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
2090
2102
|
default:
|
|
2091
2103
|
const parsedBody = parsedOutput.body;
|
|
2104
|
+
const $metadata = deserializeMetadata(output);
|
|
2105
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2092
2106
|
response = new AmplifyBackendServiceException_1.AmplifyBackendServiceException({
|
|
2093
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2107
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2094
2108
|
$fault: "client",
|
|
2095
|
-
$metadata
|
|
2109
|
+
$metadata,
|
|
2096
2110
|
});
|
|
2097
2111
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2098
2112
|
}
|
|
@@ -2134,8 +2148,7 @@ const deserializeAws_restJson1GetBackendAPICommandError = async (output, context
|
|
|
2134
2148
|
body: await parseBody(output.body, context),
|
|
2135
2149
|
};
|
|
2136
2150
|
let response;
|
|
2137
|
-
|
|
2138
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2151
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2139
2152
|
switch (errorCode) {
|
|
2140
2153
|
case "BadRequestException":
|
|
2141
2154
|
case "com.amazonaws.amplifybackend#BadRequestException":
|
|
@@ -2151,10 +2164,12 @@ const deserializeAws_restJson1GetBackendAPICommandError = async (output, context
|
|
|
2151
2164
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
2152
2165
|
default:
|
|
2153
2166
|
const parsedBody = parsedOutput.body;
|
|
2167
|
+
const $metadata = deserializeMetadata(output);
|
|
2168
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2154
2169
|
response = new AmplifyBackendServiceException_1.AmplifyBackendServiceException({
|
|
2155
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2170
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2156
2171
|
$fault: "client",
|
|
2157
|
-
$metadata
|
|
2172
|
+
$metadata,
|
|
2158
2173
|
});
|
|
2159
2174
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2160
2175
|
}
|
|
@@ -2184,8 +2199,7 @@ const deserializeAws_restJson1GetBackendAPIModelsCommandError = async (output, c
|
|
|
2184
2199
|
body: await parseBody(output.body, context),
|
|
2185
2200
|
};
|
|
2186
2201
|
let response;
|
|
2187
|
-
|
|
2188
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2202
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2189
2203
|
switch (errorCode) {
|
|
2190
2204
|
case "BadRequestException":
|
|
2191
2205
|
case "com.amazonaws.amplifybackend#BadRequestException":
|
|
@@ -2201,10 +2215,12 @@ const deserializeAws_restJson1GetBackendAPIModelsCommandError = async (output, c
|
|
|
2201
2215
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
2202
2216
|
default:
|
|
2203
2217
|
const parsedBody = parsedOutput.body;
|
|
2218
|
+
const $metadata = deserializeMetadata(output);
|
|
2219
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2204
2220
|
response = new AmplifyBackendServiceException_1.AmplifyBackendServiceException({
|
|
2205
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2221
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2206
2222
|
$fault: "client",
|
|
2207
|
-
$metadata
|
|
2223
|
+
$metadata,
|
|
2208
2224
|
});
|
|
2209
2225
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2210
2226
|
}
|
|
@@ -2246,8 +2262,7 @@ const deserializeAws_restJson1GetBackendAuthCommandError = async (output, contex
|
|
|
2246
2262
|
body: await parseBody(output.body, context),
|
|
2247
2263
|
};
|
|
2248
2264
|
let response;
|
|
2249
|
-
|
|
2250
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2265
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2251
2266
|
switch (errorCode) {
|
|
2252
2267
|
case "BadRequestException":
|
|
2253
2268
|
case "com.amazonaws.amplifybackend#BadRequestException":
|
|
@@ -2263,10 +2278,12 @@ const deserializeAws_restJson1GetBackendAuthCommandError = async (output, contex
|
|
|
2263
2278
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
2264
2279
|
default:
|
|
2265
2280
|
const parsedBody = parsedOutput.body;
|
|
2281
|
+
const $metadata = deserializeMetadata(output);
|
|
2282
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2266
2283
|
response = new AmplifyBackendServiceException_1.AmplifyBackendServiceException({
|
|
2267
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2284
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2268
2285
|
$fault: "client",
|
|
2269
|
-
$metadata
|
|
2286
|
+
$metadata,
|
|
2270
2287
|
});
|
|
2271
2288
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2272
2289
|
}
|
|
@@ -2320,8 +2337,7 @@ const deserializeAws_restJson1GetBackendJobCommandError = async (output, context
|
|
|
2320
2337
|
body: await parseBody(output.body, context),
|
|
2321
2338
|
};
|
|
2322
2339
|
let response;
|
|
2323
|
-
|
|
2324
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2340
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2325
2341
|
switch (errorCode) {
|
|
2326
2342
|
case "BadRequestException":
|
|
2327
2343
|
case "com.amazonaws.amplifybackend#BadRequestException":
|
|
@@ -2337,10 +2353,12 @@ const deserializeAws_restJson1GetBackendJobCommandError = async (output, context
|
|
|
2337
2353
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
2338
2354
|
default:
|
|
2339
2355
|
const parsedBody = parsedOutput.body;
|
|
2356
|
+
const $metadata = deserializeMetadata(output);
|
|
2357
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2340
2358
|
response = new AmplifyBackendServiceException_1.AmplifyBackendServiceException({
|
|
2341
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2359
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2342
2360
|
$fault: "client",
|
|
2343
|
-
$metadata
|
|
2361
|
+
$metadata,
|
|
2344
2362
|
});
|
|
2345
2363
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2346
2364
|
}
|
|
@@ -2378,8 +2396,7 @@ const deserializeAws_restJson1GetBackendStorageCommandError = async (output, con
|
|
|
2378
2396
|
body: await parseBody(output.body, context),
|
|
2379
2397
|
};
|
|
2380
2398
|
let response;
|
|
2381
|
-
|
|
2382
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2399
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2383
2400
|
switch (errorCode) {
|
|
2384
2401
|
case "BadRequestException":
|
|
2385
2402
|
case "com.amazonaws.amplifybackend#BadRequestException":
|
|
@@ -2395,10 +2412,12 @@ const deserializeAws_restJson1GetBackendStorageCommandError = async (output, con
|
|
|
2395
2412
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
2396
2413
|
default:
|
|
2397
2414
|
const parsedBody = parsedOutput.body;
|
|
2415
|
+
const $metadata = deserializeMetadata(output);
|
|
2416
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2398
2417
|
response = new AmplifyBackendServiceException_1.AmplifyBackendServiceException({
|
|
2399
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2418
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2400
2419
|
$fault: "client",
|
|
2401
|
-
$metadata
|
|
2420
|
+
$metadata,
|
|
2402
2421
|
});
|
|
2403
2422
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2404
2423
|
}
|
|
@@ -2436,8 +2455,7 @@ const deserializeAws_restJson1GetTokenCommandError = async (output, context) =>
|
|
|
2436
2455
|
body: await parseBody(output.body, context),
|
|
2437
2456
|
};
|
|
2438
2457
|
let response;
|
|
2439
|
-
|
|
2440
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2458
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2441
2459
|
switch (errorCode) {
|
|
2442
2460
|
case "BadRequestException":
|
|
2443
2461
|
case "com.amazonaws.amplifybackend#BadRequestException":
|
|
@@ -2453,10 +2471,12 @@ const deserializeAws_restJson1GetTokenCommandError = async (output, context) =>
|
|
|
2453
2471
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
2454
2472
|
default:
|
|
2455
2473
|
const parsedBody = parsedOutput.body;
|
|
2474
|
+
const $metadata = deserializeMetadata(output);
|
|
2475
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2456
2476
|
response = new AmplifyBackendServiceException_1.AmplifyBackendServiceException({
|
|
2457
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2477
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2458
2478
|
$fault: "client",
|
|
2459
|
-
$metadata
|
|
2479
|
+
$metadata,
|
|
2460
2480
|
});
|
|
2461
2481
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2462
2482
|
}
|
|
@@ -2502,8 +2522,7 @@ const deserializeAws_restJson1ImportBackendAuthCommandError = async (output, con
|
|
|
2502
2522
|
body: await parseBody(output.body, context),
|
|
2503
2523
|
};
|
|
2504
2524
|
let response;
|
|
2505
|
-
|
|
2506
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2525
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2507
2526
|
switch (errorCode) {
|
|
2508
2527
|
case "BadRequestException":
|
|
2509
2528
|
case "com.amazonaws.amplifybackend#BadRequestException":
|
|
@@ -2519,10 +2538,12 @@ const deserializeAws_restJson1ImportBackendAuthCommandError = async (output, con
|
|
|
2519
2538
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
2520
2539
|
default:
|
|
2521
2540
|
const parsedBody = parsedOutput.body;
|
|
2541
|
+
const $metadata = deserializeMetadata(output);
|
|
2542
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2522
2543
|
response = new AmplifyBackendServiceException_1.AmplifyBackendServiceException({
|
|
2523
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2544
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2524
2545
|
$fault: "client",
|
|
2525
|
-
$metadata
|
|
2546
|
+
$metadata,
|
|
2526
2547
|
});
|
|
2527
2548
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2528
2549
|
}
|
|
@@ -2560,8 +2581,7 @@ const deserializeAws_restJson1ImportBackendStorageCommandError = async (output,
|
|
|
2560
2581
|
body: await parseBody(output.body, context),
|
|
2561
2582
|
};
|
|
2562
2583
|
let response;
|
|
2563
|
-
|
|
2564
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2584
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2565
2585
|
switch (errorCode) {
|
|
2566
2586
|
case "BadRequestException":
|
|
2567
2587
|
case "com.amazonaws.amplifybackend#BadRequestException":
|
|
@@ -2577,10 +2597,12 @@ const deserializeAws_restJson1ImportBackendStorageCommandError = async (output,
|
|
|
2577
2597
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
2578
2598
|
default:
|
|
2579
2599
|
const parsedBody = parsedOutput.body;
|
|
2600
|
+
const $metadata = deserializeMetadata(output);
|
|
2601
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2580
2602
|
response = new AmplifyBackendServiceException_1.AmplifyBackendServiceException({
|
|
2581
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2603
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2582
2604
|
$fault: "client",
|
|
2583
|
-
$metadata
|
|
2605
|
+
$metadata,
|
|
2584
2606
|
});
|
|
2585
2607
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2586
2608
|
}
|
|
@@ -2610,8 +2632,7 @@ const deserializeAws_restJson1ListBackendJobsCommandError = async (output, conte
|
|
|
2610
2632
|
body: await parseBody(output.body, context),
|
|
2611
2633
|
};
|
|
2612
2634
|
let response;
|
|
2613
|
-
|
|
2614
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2635
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2615
2636
|
switch (errorCode) {
|
|
2616
2637
|
case "BadRequestException":
|
|
2617
2638
|
case "com.amazonaws.amplifybackend#BadRequestException":
|
|
@@ -2627,10 +2648,12 @@ const deserializeAws_restJson1ListBackendJobsCommandError = async (output, conte
|
|
|
2627
2648
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
2628
2649
|
default:
|
|
2629
2650
|
const parsedBody = parsedOutput.body;
|
|
2651
|
+
const $metadata = deserializeMetadata(output);
|
|
2652
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2630
2653
|
response = new AmplifyBackendServiceException_1.AmplifyBackendServiceException({
|
|
2631
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2654
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2632
2655
|
$fault: "client",
|
|
2633
|
-
$metadata
|
|
2656
|
+
$metadata,
|
|
2634
2657
|
});
|
|
2635
2658
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2636
2659
|
}
|
|
@@ -2660,8 +2683,7 @@ const deserializeAws_restJson1ListS3BucketsCommandError = async (output, context
|
|
|
2660
2683
|
body: await parseBody(output.body, context),
|
|
2661
2684
|
};
|
|
2662
2685
|
let response;
|
|
2663
|
-
|
|
2664
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2686
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2665
2687
|
switch (errorCode) {
|
|
2666
2688
|
case "BadRequestException":
|
|
2667
2689
|
case "com.amazonaws.amplifybackend#BadRequestException":
|
|
@@ -2677,10 +2699,12 @@ const deserializeAws_restJson1ListS3BucketsCommandError = async (output, context
|
|
|
2677
2699
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
2678
2700
|
default:
|
|
2679
2701
|
const parsedBody = parsedOutput.body;
|
|
2702
|
+
const $metadata = deserializeMetadata(output);
|
|
2703
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2680
2704
|
response = new AmplifyBackendServiceException_1.AmplifyBackendServiceException({
|
|
2681
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2705
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2682
2706
|
$fault: "client",
|
|
2683
|
-
$metadata
|
|
2707
|
+
$metadata,
|
|
2684
2708
|
});
|
|
2685
2709
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2686
2710
|
}
|
|
@@ -2722,8 +2746,7 @@ const deserializeAws_restJson1RemoveAllBackendsCommandError = async (output, con
|
|
|
2722
2746
|
body: await parseBody(output.body, context),
|
|
2723
2747
|
};
|
|
2724
2748
|
let response;
|
|
2725
|
-
|
|
2726
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2749
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2727
2750
|
switch (errorCode) {
|
|
2728
2751
|
case "BadRequestException":
|
|
2729
2752
|
case "com.amazonaws.amplifybackend#BadRequestException":
|
|
@@ -2739,10 +2762,12 @@ const deserializeAws_restJson1RemoveAllBackendsCommandError = async (output, con
|
|
|
2739
2762
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
2740
2763
|
default:
|
|
2741
2764
|
const parsedBody = parsedOutput.body;
|
|
2765
|
+
const $metadata = deserializeMetadata(output);
|
|
2766
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2742
2767
|
response = new AmplifyBackendServiceException_1.AmplifyBackendServiceException({
|
|
2743
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2768
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2744
2769
|
$fault: "client",
|
|
2745
|
-
$metadata
|
|
2770
|
+
$metadata,
|
|
2746
2771
|
});
|
|
2747
2772
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2748
2773
|
}
|
|
@@ -2768,8 +2793,7 @@ const deserializeAws_restJson1RemoveBackendConfigCommandError = async (output, c
|
|
|
2768
2793
|
body: await parseBody(output.body, context),
|
|
2769
2794
|
};
|
|
2770
2795
|
let response;
|
|
2771
|
-
|
|
2772
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2796
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2773
2797
|
switch (errorCode) {
|
|
2774
2798
|
case "BadRequestException":
|
|
2775
2799
|
case "com.amazonaws.amplifybackend#BadRequestException":
|
|
@@ -2785,10 +2809,12 @@ const deserializeAws_restJson1RemoveBackendConfigCommandError = async (output, c
|
|
|
2785
2809
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
2786
2810
|
default:
|
|
2787
2811
|
const parsedBody = parsedOutput.body;
|
|
2812
|
+
const $metadata = deserializeMetadata(output);
|
|
2813
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2788
2814
|
response = new AmplifyBackendServiceException_1.AmplifyBackendServiceException({
|
|
2789
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2815
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2790
2816
|
$fault: "client",
|
|
2791
|
-
$metadata
|
|
2817
|
+
$metadata,
|
|
2792
2818
|
});
|
|
2793
2819
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2794
2820
|
}
|
|
@@ -2834,8 +2860,7 @@ const deserializeAws_restJson1UpdateBackendAPICommandError = async (output, cont
|
|
|
2834
2860
|
body: await parseBody(output.body, context),
|
|
2835
2861
|
};
|
|
2836
2862
|
let response;
|
|
2837
|
-
|
|
2838
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2863
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2839
2864
|
switch (errorCode) {
|
|
2840
2865
|
case "BadRequestException":
|
|
2841
2866
|
case "com.amazonaws.amplifybackend#BadRequestException":
|
|
@@ -2851,10 +2876,12 @@ const deserializeAws_restJson1UpdateBackendAPICommandError = async (output, cont
|
|
|
2851
2876
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
2852
2877
|
default:
|
|
2853
2878
|
const parsedBody = parsedOutput.body;
|
|
2879
|
+
const $metadata = deserializeMetadata(output);
|
|
2880
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2854
2881
|
response = new AmplifyBackendServiceException_1.AmplifyBackendServiceException({
|
|
2855
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2882
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2856
2883
|
$fault: "client",
|
|
2857
|
-
$metadata
|
|
2884
|
+
$metadata,
|
|
2858
2885
|
});
|
|
2859
2886
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2860
2887
|
}
|
|
@@ -2900,8 +2927,7 @@ const deserializeAws_restJson1UpdateBackendAuthCommandError = async (output, con
|
|
|
2900
2927
|
body: await parseBody(output.body, context),
|
|
2901
2928
|
};
|
|
2902
2929
|
let response;
|
|
2903
|
-
|
|
2904
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2930
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2905
2931
|
switch (errorCode) {
|
|
2906
2932
|
case "BadRequestException":
|
|
2907
2933
|
case "com.amazonaws.amplifybackend#BadRequestException":
|
|
@@ -2917,10 +2943,12 @@ const deserializeAws_restJson1UpdateBackendAuthCommandError = async (output, con
|
|
|
2917
2943
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
2918
2944
|
default:
|
|
2919
2945
|
const parsedBody = parsedOutput.body;
|
|
2946
|
+
const $metadata = deserializeMetadata(output);
|
|
2947
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2920
2948
|
response = new AmplifyBackendServiceException_1.AmplifyBackendServiceException({
|
|
2921
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2949
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2922
2950
|
$fault: "client",
|
|
2923
|
-
$metadata
|
|
2951
|
+
$metadata,
|
|
2924
2952
|
});
|
|
2925
2953
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2926
2954
|
}
|
|
@@ -2958,8 +2986,7 @@ const deserializeAws_restJson1UpdateBackendConfigCommandError = async (output, c
|
|
|
2958
2986
|
body: await parseBody(output.body, context),
|
|
2959
2987
|
};
|
|
2960
2988
|
let response;
|
|
2961
|
-
|
|
2962
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2989
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2963
2990
|
switch (errorCode) {
|
|
2964
2991
|
case "BadRequestException":
|
|
2965
2992
|
case "com.amazonaws.amplifybackend#BadRequestException":
|
|
@@ -2975,10 +3002,12 @@ const deserializeAws_restJson1UpdateBackendConfigCommandError = async (output, c
|
|
|
2975
3002
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
2976
3003
|
default:
|
|
2977
3004
|
const parsedBody = parsedOutput.body;
|
|
3005
|
+
const $metadata = deserializeMetadata(output);
|
|
3006
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2978
3007
|
response = new AmplifyBackendServiceException_1.AmplifyBackendServiceException({
|
|
2979
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3008
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2980
3009
|
$fault: "client",
|
|
2981
|
-
$metadata
|
|
3010
|
+
$metadata,
|
|
2982
3011
|
});
|
|
2983
3012
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2984
3013
|
}
|
|
@@ -3032,8 +3061,7 @@ const deserializeAws_restJson1UpdateBackendJobCommandError = async (output, cont
|
|
|
3032
3061
|
body: await parseBody(output.body, context),
|
|
3033
3062
|
};
|
|
3034
3063
|
let response;
|
|
3035
|
-
|
|
3036
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3064
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3037
3065
|
switch (errorCode) {
|
|
3038
3066
|
case "BadRequestException":
|
|
3039
3067
|
case "com.amazonaws.amplifybackend#BadRequestException":
|
|
@@ -3049,10 +3077,12 @@ const deserializeAws_restJson1UpdateBackendJobCommandError = async (output, cont
|
|
|
3049
3077
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
3050
3078
|
default:
|
|
3051
3079
|
const parsedBody = parsedOutput.body;
|
|
3080
|
+
const $metadata = deserializeMetadata(output);
|
|
3081
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3052
3082
|
response = new AmplifyBackendServiceException_1.AmplifyBackendServiceException({
|
|
3053
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3083
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3054
3084
|
$fault: "client",
|
|
3055
|
-
$metadata
|
|
3085
|
+
$metadata,
|
|
3056
3086
|
});
|
|
3057
3087
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3058
3088
|
}
|
|
@@ -3090,8 +3120,7 @@ const deserializeAws_restJson1UpdateBackendStorageCommandError = async (output,
|
|
|
3090
3120
|
body: await parseBody(output.body, context),
|
|
3091
3121
|
};
|
|
3092
3122
|
let response;
|
|
3093
|
-
|
|
3094
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3123
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3095
3124
|
switch (errorCode) {
|
|
3096
3125
|
case "BadRequestException":
|
|
3097
3126
|
case "com.amazonaws.amplifybackend#BadRequestException":
|
|
@@ -3107,10 +3136,12 @@ const deserializeAws_restJson1UpdateBackendStorageCommandError = async (output,
|
|
|
3107
3136
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
3108
3137
|
default:
|
|
3109
3138
|
const parsedBody = parsedOutput.body;
|
|
3139
|
+
const $metadata = deserializeMetadata(output);
|
|
3140
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3110
3141
|
response = new AmplifyBackendServiceException_1.AmplifyBackendServiceException({
|
|
3111
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3142
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3112
3143
|
$fault: "client",
|
|
3113
|
-
$metadata
|
|
3144
|
+
$metadata,
|
|
3114
3145
|
});
|
|
3115
3146
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3116
3147
|
}
|
|
@@ -4008,5 +4039,4 @@ const loadRestJsonErrorCode = (output, data) => {
|
|
|
4008
4039
|
if (data["__type"] !== undefined) {
|
|
4009
4040
|
return sanitizeErrorCode(data["__type"]);
|
|
4010
4041
|
}
|
|
4011
|
-
return "";
|
|
4012
4042
|
};
|