@aws-sdk/client-dataexchange 3.118.1 → 3.121.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist-cjs/protocols/Aws_restJson1.js +145 -117
- package/dist-es/protocols/Aws_restJson1.js +145 -117
- package/package.json +3 -3
|
@@ -950,8 +950,7 @@ const deserializeAws_restJson1CancelJobCommandError = async (output, context) =>
|
|
|
950
950
|
body: await parseBody(output.body, context),
|
|
951
951
|
};
|
|
952
952
|
let response;
|
|
953
|
-
|
|
954
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
953
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
955
954
|
switch (errorCode) {
|
|
956
955
|
case "ConflictException":
|
|
957
956
|
case "com.amazonaws.dataexchange#ConflictException":
|
|
@@ -970,10 +969,12 @@ const deserializeAws_restJson1CancelJobCommandError = async (output, context) =>
|
|
|
970
969
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
971
970
|
default:
|
|
972
971
|
const parsedBody = parsedOutput.body;
|
|
972
|
+
const $metadata = deserializeMetadata(output);
|
|
973
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
973
974
|
response = new DataExchangeServiceException_1.DataExchangeServiceException({
|
|
974
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
975
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
975
976
|
$fault: "client",
|
|
976
|
-
$metadata
|
|
977
|
+
$metadata,
|
|
977
978
|
});
|
|
978
979
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
979
980
|
}
|
|
@@ -1039,8 +1040,7 @@ const deserializeAws_restJson1CreateDataSetCommandError = async (output, context
|
|
|
1039
1040
|
body: await parseBody(output.body, context),
|
|
1040
1041
|
};
|
|
1041
1042
|
let response;
|
|
1042
|
-
|
|
1043
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1043
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1044
1044
|
switch (errorCode) {
|
|
1045
1045
|
case "AccessDeniedException":
|
|
1046
1046
|
case "com.amazonaws.dataexchange#AccessDeniedException":
|
|
@@ -1059,10 +1059,12 @@ const deserializeAws_restJson1CreateDataSetCommandError = async (output, context
|
|
|
1059
1059
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1060
1060
|
default:
|
|
1061
1061
|
const parsedBody = parsedOutput.body;
|
|
1062
|
+
const $metadata = deserializeMetadata(output);
|
|
1063
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1062
1064
|
response = new DataExchangeServiceException_1.DataExchangeServiceException({
|
|
1063
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1065
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1064
1066
|
$fault: "client",
|
|
1065
|
-
$metadata
|
|
1067
|
+
$metadata,
|
|
1066
1068
|
});
|
|
1067
1069
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1068
1070
|
}
|
|
@@ -1108,8 +1110,7 @@ const deserializeAws_restJson1CreateEventActionCommandError = async (output, con
|
|
|
1108
1110
|
body: await parseBody(output.body, context),
|
|
1109
1111
|
};
|
|
1110
1112
|
let response;
|
|
1111
|
-
|
|
1112
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1113
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1113
1114
|
switch (errorCode) {
|
|
1114
1115
|
case "AccessDeniedException":
|
|
1115
1116
|
case "com.amazonaws.dataexchange#AccessDeniedException":
|
|
@@ -1128,10 +1129,12 @@ const deserializeAws_restJson1CreateEventActionCommandError = async (output, con
|
|
|
1128
1129
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1129
1130
|
default:
|
|
1130
1131
|
const parsedBody = parsedOutput.body;
|
|
1132
|
+
const $metadata = deserializeMetadata(output);
|
|
1133
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1131
1134
|
response = new DataExchangeServiceException_1.DataExchangeServiceException({
|
|
1132
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1135
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1133
1136
|
$fault: "client",
|
|
1134
|
-
$metadata
|
|
1137
|
+
$metadata,
|
|
1135
1138
|
});
|
|
1136
1139
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1137
1140
|
}
|
|
@@ -1185,8 +1188,7 @@ const deserializeAws_restJson1CreateJobCommandError = async (output, context) =>
|
|
|
1185
1188
|
body: await parseBody(output.body, context),
|
|
1186
1189
|
};
|
|
1187
1190
|
let response;
|
|
1188
|
-
|
|
1189
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1191
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1190
1192
|
switch (errorCode) {
|
|
1191
1193
|
case "AccessDeniedException":
|
|
1192
1194
|
case "com.amazonaws.dataexchange#AccessDeniedException":
|
|
@@ -1208,10 +1210,12 @@ const deserializeAws_restJson1CreateJobCommandError = async (output, context) =>
|
|
|
1208
1210
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1209
1211
|
default:
|
|
1210
1212
|
const parsedBody = parsedOutput.body;
|
|
1213
|
+
const $metadata = deserializeMetadata(output);
|
|
1214
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1211
1215
|
response = new DataExchangeServiceException_1.DataExchangeServiceException({
|
|
1212
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1216
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1213
1217
|
$fault: "client",
|
|
1214
|
-
$metadata
|
|
1218
|
+
$metadata,
|
|
1215
1219
|
});
|
|
1216
1220
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1217
1221
|
}
|
|
@@ -1281,8 +1285,7 @@ const deserializeAws_restJson1CreateRevisionCommandError = async (output, contex
|
|
|
1281
1285
|
body: await parseBody(output.body, context),
|
|
1282
1286
|
};
|
|
1283
1287
|
let response;
|
|
1284
|
-
|
|
1285
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1288
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1286
1289
|
switch (errorCode) {
|
|
1287
1290
|
case "AccessDeniedException":
|
|
1288
1291
|
case "com.amazonaws.dataexchange#AccessDeniedException":
|
|
@@ -1301,10 +1304,12 @@ const deserializeAws_restJson1CreateRevisionCommandError = async (output, contex
|
|
|
1301
1304
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1302
1305
|
default:
|
|
1303
1306
|
const parsedBody = parsedOutput.body;
|
|
1307
|
+
const $metadata = deserializeMetadata(output);
|
|
1308
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1304
1309
|
response = new DataExchangeServiceException_1.DataExchangeServiceException({
|
|
1305
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1310
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1306
1311
|
$fault: "client",
|
|
1307
|
-
$metadata
|
|
1312
|
+
$metadata,
|
|
1308
1313
|
});
|
|
1309
1314
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1310
1315
|
}
|
|
@@ -1326,8 +1331,7 @@ const deserializeAws_restJson1DeleteAssetCommandError = async (output, context)
|
|
|
1326
1331
|
body: await parseBody(output.body, context),
|
|
1327
1332
|
};
|
|
1328
1333
|
let response;
|
|
1329
|
-
|
|
1330
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1334
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1331
1335
|
switch (errorCode) {
|
|
1332
1336
|
case "AccessDeniedException":
|
|
1333
1337
|
case "com.amazonaws.dataexchange#AccessDeniedException":
|
|
@@ -1349,10 +1353,12 @@ const deserializeAws_restJson1DeleteAssetCommandError = async (output, context)
|
|
|
1349
1353
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1350
1354
|
default:
|
|
1351
1355
|
const parsedBody = parsedOutput.body;
|
|
1356
|
+
const $metadata = deserializeMetadata(output);
|
|
1357
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1352
1358
|
response = new DataExchangeServiceException_1.DataExchangeServiceException({
|
|
1353
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1359
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1354
1360
|
$fault: "client",
|
|
1355
|
-
$metadata
|
|
1361
|
+
$metadata,
|
|
1356
1362
|
});
|
|
1357
1363
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1358
1364
|
}
|
|
@@ -1374,8 +1380,7 @@ const deserializeAws_restJson1DeleteDataSetCommandError = async (output, context
|
|
|
1374
1380
|
body: await parseBody(output.body, context),
|
|
1375
1381
|
};
|
|
1376
1382
|
let response;
|
|
1377
|
-
|
|
1378
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1383
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1379
1384
|
switch (errorCode) {
|
|
1380
1385
|
case "AccessDeniedException":
|
|
1381
1386
|
case "com.amazonaws.dataexchange#AccessDeniedException":
|
|
@@ -1397,10 +1402,12 @@ const deserializeAws_restJson1DeleteDataSetCommandError = async (output, context
|
|
|
1397
1402
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1398
1403
|
default:
|
|
1399
1404
|
const parsedBody = parsedOutput.body;
|
|
1405
|
+
const $metadata = deserializeMetadata(output);
|
|
1406
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1400
1407
|
response = new DataExchangeServiceException_1.DataExchangeServiceException({
|
|
1401
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1408
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1402
1409
|
$fault: "client",
|
|
1403
|
-
$metadata
|
|
1410
|
+
$metadata,
|
|
1404
1411
|
});
|
|
1405
1412
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1406
1413
|
}
|
|
@@ -1422,8 +1429,7 @@ const deserializeAws_restJson1DeleteEventActionCommandError = async (output, con
|
|
|
1422
1429
|
body: await parseBody(output.body, context),
|
|
1423
1430
|
};
|
|
1424
1431
|
let response;
|
|
1425
|
-
|
|
1426
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1432
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1427
1433
|
switch (errorCode) {
|
|
1428
1434
|
case "InternalServerException":
|
|
1429
1435
|
case "com.amazonaws.dataexchange#InternalServerException":
|
|
@@ -1439,10 +1445,12 @@ const deserializeAws_restJson1DeleteEventActionCommandError = async (output, con
|
|
|
1439
1445
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1440
1446
|
default:
|
|
1441
1447
|
const parsedBody = parsedOutput.body;
|
|
1448
|
+
const $metadata = deserializeMetadata(output);
|
|
1449
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1442
1450
|
response = new DataExchangeServiceException_1.DataExchangeServiceException({
|
|
1443
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1451
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1444
1452
|
$fault: "client",
|
|
1445
|
-
$metadata
|
|
1453
|
+
$metadata,
|
|
1446
1454
|
});
|
|
1447
1455
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1448
1456
|
}
|
|
@@ -1464,8 +1472,7 @@ const deserializeAws_restJson1DeleteRevisionCommandError = async (output, contex
|
|
|
1464
1472
|
body: await parseBody(output.body, context),
|
|
1465
1473
|
};
|
|
1466
1474
|
let response;
|
|
1467
|
-
|
|
1468
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1475
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1469
1476
|
switch (errorCode) {
|
|
1470
1477
|
case "AccessDeniedException":
|
|
1471
1478
|
case "com.amazonaws.dataexchange#AccessDeniedException":
|
|
@@ -1487,10 +1494,12 @@ const deserializeAws_restJson1DeleteRevisionCommandError = async (output, contex
|
|
|
1487
1494
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1488
1495
|
default:
|
|
1489
1496
|
const parsedBody = parsedOutput.body;
|
|
1497
|
+
const $metadata = deserializeMetadata(output);
|
|
1498
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1490
1499
|
response = new DataExchangeServiceException_1.DataExchangeServiceException({
|
|
1491
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1500
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1492
1501
|
$fault: "client",
|
|
1493
|
-
$metadata
|
|
1502
|
+
$metadata,
|
|
1494
1503
|
});
|
|
1495
1504
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1496
1505
|
}
|
|
@@ -1552,8 +1561,7 @@ const deserializeAws_restJson1GetAssetCommandError = async (output, context) =>
|
|
|
1552
1561
|
body: await parseBody(output.body, context),
|
|
1553
1562
|
};
|
|
1554
1563
|
let response;
|
|
1555
|
-
|
|
1556
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1564
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1557
1565
|
switch (errorCode) {
|
|
1558
1566
|
case "InternalServerException":
|
|
1559
1567
|
case "com.amazonaws.dataexchange#InternalServerException":
|
|
@@ -1569,10 +1577,12 @@ const deserializeAws_restJson1GetAssetCommandError = async (output, context) =>
|
|
|
1569
1577
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1570
1578
|
default:
|
|
1571
1579
|
const parsedBody = parsedOutput.body;
|
|
1580
|
+
const $metadata = deserializeMetadata(output);
|
|
1581
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1572
1582
|
response = new DataExchangeServiceException_1.DataExchangeServiceException({
|
|
1573
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1583
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1574
1584
|
$fault: "client",
|
|
1575
|
-
$metadata
|
|
1585
|
+
$metadata,
|
|
1576
1586
|
});
|
|
1577
1587
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1578
1588
|
}
|
|
@@ -1638,8 +1648,7 @@ const deserializeAws_restJson1GetDataSetCommandError = async (output, context) =
|
|
|
1638
1648
|
body: await parseBody(output.body, context),
|
|
1639
1649
|
};
|
|
1640
1650
|
let response;
|
|
1641
|
-
|
|
1642
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1651
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1643
1652
|
switch (errorCode) {
|
|
1644
1653
|
case "InternalServerException":
|
|
1645
1654
|
case "com.amazonaws.dataexchange#InternalServerException":
|
|
@@ -1655,10 +1664,12 @@ const deserializeAws_restJson1GetDataSetCommandError = async (output, context) =
|
|
|
1655
1664
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1656
1665
|
default:
|
|
1657
1666
|
const parsedBody = parsedOutput.body;
|
|
1667
|
+
const $metadata = deserializeMetadata(output);
|
|
1668
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1658
1669
|
response = new DataExchangeServiceException_1.DataExchangeServiceException({
|
|
1659
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1670
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1660
1671
|
$fault: "client",
|
|
1661
|
-
$metadata
|
|
1672
|
+
$metadata,
|
|
1662
1673
|
});
|
|
1663
1674
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1664
1675
|
}
|
|
@@ -1704,8 +1715,7 @@ const deserializeAws_restJson1GetEventActionCommandError = async (output, contex
|
|
|
1704
1715
|
body: await parseBody(output.body, context),
|
|
1705
1716
|
};
|
|
1706
1717
|
let response;
|
|
1707
|
-
|
|
1708
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1718
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1709
1719
|
switch (errorCode) {
|
|
1710
1720
|
case "InternalServerException":
|
|
1711
1721
|
case "com.amazonaws.dataexchange#InternalServerException":
|
|
@@ -1721,10 +1731,12 @@ const deserializeAws_restJson1GetEventActionCommandError = async (output, contex
|
|
|
1721
1731
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1722
1732
|
default:
|
|
1723
1733
|
const parsedBody = parsedOutput.body;
|
|
1734
|
+
const $metadata = deserializeMetadata(output);
|
|
1735
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1724
1736
|
response = new DataExchangeServiceException_1.DataExchangeServiceException({
|
|
1725
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1737
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1726
1738
|
$fault: "client",
|
|
1727
|
-
$metadata
|
|
1739
|
+
$metadata,
|
|
1728
1740
|
});
|
|
1729
1741
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1730
1742
|
}
|
|
@@ -1778,8 +1790,7 @@ const deserializeAws_restJson1GetJobCommandError = async (output, context) => {
|
|
|
1778
1790
|
body: await parseBody(output.body, context),
|
|
1779
1791
|
};
|
|
1780
1792
|
let response;
|
|
1781
|
-
|
|
1782
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1793
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1783
1794
|
switch (errorCode) {
|
|
1784
1795
|
case "InternalServerException":
|
|
1785
1796
|
case "com.amazonaws.dataexchange#InternalServerException":
|
|
@@ -1795,10 +1806,12 @@ const deserializeAws_restJson1GetJobCommandError = async (output, context) => {
|
|
|
1795
1806
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1796
1807
|
default:
|
|
1797
1808
|
const parsedBody = parsedOutput.body;
|
|
1809
|
+
const $metadata = deserializeMetadata(output);
|
|
1810
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1798
1811
|
response = new DataExchangeServiceException_1.DataExchangeServiceException({
|
|
1799
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1812
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1800
1813
|
$fault: "client",
|
|
1801
|
-
$metadata
|
|
1814
|
+
$metadata,
|
|
1802
1815
|
});
|
|
1803
1816
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1804
1817
|
}
|
|
@@ -1868,8 +1881,7 @@ const deserializeAws_restJson1GetRevisionCommandError = async (output, context)
|
|
|
1868
1881
|
body: await parseBody(output.body, context),
|
|
1869
1882
|
};
|
|
1870
1883
|
let response;
|
|
1871
|
-
|
|
1872
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1884
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1873
1885
|
switch (errorCode) {
|
|
1874
1886
|
case "InternalServerException":
|
|
1875
1887
|
case "com.amazonaws.dataexchange#InternalServerException":
|
|
@@ -1885,10 +1897,12 @@ const deserializeAws_restJson1GetRevisionCommandError = async (output, context)
|
|
|
1885
1897
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1886
1898
|
default:
|
|
1887
1899
|
const parsedBody = parsedOutput.body;
|
|
1900
|
+
const $metadata = deserializeMetadata(output);
|
|
1901
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1888
1902
|
response = new DataExchangeServiceException_1.DataExchangeServiceException({
|
|
1889
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1903
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1890
1904
|
$fault: "client",
|
|
1891
|
-
$metadata
|
|
1905
|
+
$metadata,
|
|
1892
1906
|
});
|
|
1893
1907
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1894
1908
|
}
|
|
@@ -1918,8 +1932,7 @@ const deserializeAws_restJson1ListDataSetRevisionsCommandError = async (output,
|
|
|
1918
1932
|
body: await parseBody(output.body, context),
|
|
1919
1933
|
};
|
|
1920
1934
|
let response;
|
|
1921
|
-
|
|
1922
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1935
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1923
1936
|
switch (errorCode) {
|
|
1924
1937
|
case "InternalServerException":
|
|
1925
1938
|
case "com.amazonaws.dataexchange#InternalServerException":
|
|
@@ -1935,10 +1948,12 @@ const deserializeAws_restJson1ListDataSetRevisionsCommandError = async (output,
|
|
|
1935
1948
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1936
1949
|
default:
|
|
1937
1950
|
const parsedBody = parsedOutput.body;
|
|
1951
|
+
const $metadata = deserializeMetadata(output);
|
|
1952
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1938
1953
|
response = new DataExchangeServiceException_1.DataExchangeServiceException({
|
|
1939
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1954
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1940
1955
|
$fault: "client",
|
|
1941
|
-
$metadata
|
|
1956
|
+
$metadata,
|
|
1942
1957
|
});
|
|
1943
1958
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1944
1959
|
}
|
|
@@ -1968,8 +1983,7 @@ const deserializeAws_restJson1ListDataSetsCommandError = async (output, context)
|
|
|
1968
1983
|
body: await parseBody(output.body, context),
|
|
1969
1984
|
};
|
|
1970
1985
|
let response;
|
|
1971
|
-
|
|
1972
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1986
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1973
1987
|
switch (errorCode) {
|
|
1974
1988
|
case "InternalServerException":
|
|
1975
1989
|
case "com.amazonaws.dataexchange#InternalServerException":
|
|
@@ -1985,10 +1999,12 @@ const deserializeAws_restJson1ListDataSetsCommandError = async (output, context)
|
|
|
1985
1999
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1986
2000
|
default:
|
|
1987
2001
|
const parsedBody = parsedOutput.body;
|
|
2002
|
+
const $metadata = deserializeMetadata(output);
|
|
2003
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1988
2004
|
response = new DataExchangeServiceException_1.DataExchangeServiceException({
|
|
1989
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2005
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1990
2006
|
$fault: "client",
|
|
1991
|
-
$metadata
|
|
2007
|
+
$metadata,
|
|
1992
2008
|
});
|
|
1993
2009
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1994
2010
|
}
|
|
@@ -2018,8 +2034,7 @@ const deserializeAws_restJson1ListEventActionsCommandError = async (output, cont
|
|
|
2018
2034
|
body: await parseBody(output.body, context),
|
|
2019
2035
|
};
|
|
2020
2036
|
let response;
|
|
2021
|
-
|
|
2022
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2037
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2023
2038
|
switch (errorCode) {
|
|
2024
2039
|
case "InternalServerException":
|
|
2025
2040
|
case "com.amazonaws.dataexchange#InternalServerException":
|
|
@@ -2035,10 +2050,12 @@ const deserializeAws_restJson1ListEventActionsCommandError = async (output, cont
|
|
|
2035
2050
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2036
2051
|
default:
|
|
2037
2052
|
const parsedBody = parsedOutput.body;
|
|
2053
|
+
const $metadata = deserializeMetadata(output);
|
|
2054
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2038
2055
|
response = new DataExchangeServiceException_1.DataExchangeServiceException({
|
|
2039
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2056
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2040
2057
|
$fault: "client",
|
|
2041
|
-
$metadata
|
|
2058
|
+
$metadata,
|
|
2042
2059
|
});
|
|
2043
2060
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2044
2061
|
}
|
|
@@ -2068,8 +2085,7 @@ const deserializeAws_restJson1ListJobsCommandError = async (output, context) =>
|
|
|
2068
2085
|
body: await parseBody(output.body, context),
|
|
2069
2086
|
};
|
|
2070
2087
|
let response;
|
|
2071
|
-
|
|
2072
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2088
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2073
2089
|
switch (errorCode) {
|
|
2074
2090
|
case "InternalServerException":
|
|
2075
2091
|
case "com.amazonaws.dataexchange#InternalServerException":
|
|
@@ -2085,10 +2101,12 @@ const deserializeAws_restJson1ListJobsCommandError = async (output, context) =>
|
|
|
2085
2101
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2086
2102
|
default:
|
|
2087
2103
|
const parsedBody = parsedOutput.body;
|
|
2104
|
+
const $metadata = deserializeMetadata(output);
|
|
2105
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2088
2106
|
response = new DataExchangeServiceException_1.DataExchangeServiceException({
|
|
2089
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2107
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2090
2108
|
$fault: "client",
|
|
2091
|
-
$metadata
|
|
2109
|
+
$metadata,
|
|
2092
2110
|
});
|
|
2093
2111
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2094
2112
|
}
|
|
@@ -2118,8 +2136,7 @@ const deserializeAws_restJson1ListRevisionAssetsCommandError = async (output, co
|
|
|
2118
2136
|
body: await parseBody(output.body, context),
|
|
2119
2137
|
};
|
|
2120
2138
|
let response;
|
|
2121
|
-
|
|
2122
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2139
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2123
2140
|
switch (errorCode) {
|
|
2124
2141
|
case "InternalServerException":
|
|
2125
2142
|
case "com.amazonaws.dataexchange#InternalServerException":
|
|
@@ -2135,10 +2152,12 @@ const deserializeAws_restJson1ListRevisionAssetsCommandError = async (output, co
|
|
|
2135
2152
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2136
2153
|
default:
|
|
2137
2154
|
const parsedBody = parsedOutput.body;
|
|
2155
|
+
const $metadata = deserializeMetadata(output);
|
|
2156
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2138
2157
|
response = new DataExchangeServiceException_1.DataExchangeServiceException({
|
|
2139
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2158
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2140
2159
|
$fault: "client",
|
|
2141
|
-
$metadata
|
|
2160
|
+
$metadata,
|
|
2142
2161
|
});
|
|
2143
2162
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2144
2163
|
}
|
|
@@ -2164,15 +2183,16 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
2164
2183
|
body: await parseBody(output.body, context),
|
|
2165
2184
|
};
|
|
2166
2185
|
let response;
|
|
2167
|
-
|
|
2168
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2186
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2169
2187
|
switch (errorCode) {
|
|
2170
2188
|
default:
|
|
2171
2189
|
const parsedBody = parsedOutput.body;
|
|
2190
|
+
const $metadata = deserializeMetadata(output);
|
|
2191
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2172
2192
|
response = new DataExchangeServiceException_1.DataExchangeServiceException({
|
|
2173
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2193
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2174
2194
|
$fault: "client",
|
|
2175
|
-
$metadata
|
|
2195
|
+
$metadata,
|
|
2176
2196
|
});
|
|
2177
2197
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2178
2198
|
}
|
|
@@ -2238,8 +2258,7 @@ const deserializeAws_restJson1RevokeRevisionCommandError = async (output, contex
|
|
|
2238
2258
|
body: await parseBody(output.body, context),
|
|
2239
2259
|
};
|
|
2240
2260
|
let response;
|
|
2241
|
-
|
|
2242
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2261
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2243
2262
|
switch (errorCode) {
|
|
2244
2263
|
case "AccessDeniedException":
|
|
2245
2264
|
case "com.amazonaws.dataexchange#AccessDeniedException":
|
|
@@ -2261,10 +2280,12 @@ const deserializeAws_restJson1RevokeRevisionCommandError = async (output, contex
|
|
|
2261
2280
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2262
2281
|
default:
|
|
2263
2282
|
const parsedBody = parsedOutput.body;
|
|
2283
|
+
const $metadata = deserializeMetadata(output);
|
|
2284
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2264
2285
|
response = new DataExchangeServiceException_1.DataExchangeServiceException({
|
|
2265
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2286
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2266
2287
|
$fault: "client",
|
|
2267
|
-
$metadata
|
|
2288
|
+
$metadata,
|
|
2268
2289
|
});
|
|
2269
2290
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2270
2291
|
}
|
|
@@ -2297,8 +2318,7 @@ const deserializeAws_restJson1SendApiAssetCommandError = async (output, context)
|
|
|
2297
2318
|
body: await parseBody(output.body, context),
|
|
2298
2319
|
};
|
|
2299
2320
|
let response;
|
|
2300
|
-
|
|
2301
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2321
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2302
2322
|
switch (errorCode) {
|
|
2303
2323
|
case "AccessDeniedException":
|
|
2304
2324
|
case "com.amazonaws.dataexchange#AccessDeniedException":
|
|
@@ -2317,10 +2337,12 @@ const deserializeAws_restJson1SendApiAssetCommandError = async (output, context)
|
|
|
2317
2337
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2318
2338
|
default:
|
|
2319
2339
|
const parsedBody = parsedOutput.body;
|
|
2340
|
+
const $metadata = deserializeMetadata(output);
|
|
2341
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2320
2342
|
response = new DataExchangeServiceException_1.DataExchangeServiceException({
|
|
2321
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2343
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2322
2344
|
$fault: "client",
|
|
2323
|
-
$metadata
|
|
2345
|
+
$metadata,
|
|
2324
2346
|
});
|
|
2325
2347
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2326
2348
|
}
|
|
@@ -2342,8 +2364,7 @@ const deserializeAws_restJson1StartJobCommandError = async (output, context) =>
|
|
|
2342
2364
|
body: await parseBody(output.body, context),
|
|
2343
2365
|
};
|
|
2344
2366
|
let response;
|
|
2345
|
-
|
|
2346
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2367
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2347
2368
|
switch (errorCode) {
|
|
2348
2369
|
case "AccessDeniedException":
|
|
2349
2370
|
case "com.amazonaws.dataexchange#AccessDeniedException":
|
|
@@ -2365,10 +2386,12 @@ const deserializeAws_restJson1StartJobCommandError = async (output, context) =>
|
|
|
2365
2386
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2366
2387
|
default:
|
|
2367
2388
|
const parsedBody = parsedOutput.body;
|
|
2389
|
+
const $metadata = deserializeMetadata(output);
|
|
2390
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2368
2391
|
response = new DataExchangeServiceException_1.DataExchangeServiceException({
|
|
2369
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2392
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2370
2393
|
$fault: "client",
|
|
2371
|
-
$metadata
|
|
2394
|
+
$metadata,
|
|
2372
2395
|
});
|
|
2373
2396
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2374
2397
|
}
|
|
@@ -2390,15 +2413,16 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
2390
2413
|
body: await parseBody(output.body, context),
|
|
2391
2414
|
};
|
|
2392
2415
|
let response;
|
|
2393
|
-
|
|
2394
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2416
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2395
2417
|
switch (errorCode) {
|
|
2396
2418
|
default:
|
|
2397
2419
|
const parsedBody = parsedOutput.body;
|
|
2420
|
+
const $metadata = deserializeMetadata(output);
|
|
2421
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2398
2422
|
response = new DataExchangeServiceException_1.DataExchangeServiceException({
|
|
2399
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2423
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2400
2424
|
$fault: "client",
|
|
2401
|
-
$metadata
|
|
2425
|
+
$metadata,
|
|
2402
2426
|
});
|
|
2403
2427
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2404
2428
|
}
|
|
@@ -2420,15 +2444,16 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
2420
2444
|
body: await parseBody(output.body, context),
|
|
2421
2445
|
};
|
|
2422
2446
|
let response;
|
|
2423
|
-
|
|
2424
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2447
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2425
2448
|
switch (errorCode) {
|
|
2426
2449
|
default:
|
|
2427
2450
|
const parsedBody = parsedOutput.body;
|
|
2451
|
+
const $metadata = deserializeMetadata(output);
|
|
2452
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2428
2453
|
response = new DataExchangeServiceException_1.DataExchangeServiceException({
|
|
2429
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2454
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2430
2455
|
$fault: "client",
|
|
2431
|
-
$metadata
|
|
2456
|
+
$metadata,
|
|
2432
2457
|
});
|
|
2433
2458
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2434
2459
|
}
|
|
@@ -2490,8 +2515,7 @@ const deserializeAws_restJson1UpdateAssetCommandError = async (output, context)
|
|
|
2490
2515
|
body: await parseBody(output.body, context),
|
|
2491
2516
|
};
|
|
2492
2517
|
let response;
|
|
2493
|
-
|
|
2494
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2518
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2495
2519
|
switch (errorCode) {
|
|
2496
2520
|
case "AccessDeniedException":
|
|
2497
2521
|
case "com.amazonaws.dataexchange#AccessDeniedException":
|
|
@@ -2513,10 +2537,12 @@ const deserializeAws_restJson1UpdateAssetCommandError = async (output, context)
|
|
|
2513
2537
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2514
2538
|
default:
|
|
2515
2539
|
const parsedBody = parsedOutput.body;
|
|
2540
|
+
const $metadata = deserializeMetadata(output);
|
|
2541
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2516
2542
|
response = new DataExchangeServiceException_1.DataExchangeServiceException({
|
|
2517
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2543
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2518
2544
|
$fault: "client",
|
|
2519
|
-
$metadata
|
|
2545
|
+
$metadata,
|
|
2520
2546
|
});
|
|
2521
2547
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2522
2548
|
}
|
|
@@ -2578,8 +2604,7 @@ const deserializeAws_restJson1UpdateDataSetCommandError = async (output, context
|
|
|
2578
2604
|
body: await parseBody(output.body, context),
|
|
2579
2605
|
};
|
|
2580
2606
|
let response;
|
|
2581
|
-
|
|
2582
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2607
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2583
2608
|
switch (errorCode) {
|
|
2584
2609
|
case "AccessDeniedException":
|
|
2585
2610
|
case "com.amazonaws.dataexchange#AccessDeniedException":
|
|
@@ -2598,10 +2623,12 @@ const deserializeAws_restJson1UpdateDataSetCommandError = async (output, context
|
|
|
2598
2623
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2599
2624
|
default:
|
|
2600
2625
|
const parsedBody = parsedOutput.body;
|
|
2626
|
+
const $metadata = deserializeMetadata(output);
|
|
2627
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2601
2628
|
response = new DataExchangeServiceException_1.DataExchangeServiceException({
|
|
2602
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2629
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2603
2630
|
$fault: "client",
|
|
2604
|
-
$metadata
|
|
2631
|
+
$metadata,
|
|
2605
2632
|
});
|
|
2606
2633
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2607
2634
|
}
|
|
@@ -2647,8 +2674,7 @@ const deserializeAws_restJson1UpdateEventActionCommandError = async (output, con
|
|
|
2647
2674
|
body: await parseBody(output.body, context),
|
|
2648
2675
|
};
|
|
2649
2676
|
let response;
|
|
2650
|
-
|
|
2651
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2677
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2652
2678
|
switch (errorCode) {
|
|
2653
2679
|
case "AccessDeniedException":
|
|
2654
2680
|
case "com.amazonaws.dataexchange#AccessDeniedException":
|
|
@@ -2667,10 +2693,12 @@ const deserializeAws_restJson1UpdateEventActionCommandError = async (output, con
|
|
|
2667
2693
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2668
2694
|
default:
|
|
2669
2695
|
const parsedBody = parsedOutput.body;
|
|
2696
|
+
const $metadata = deserializeMetadata(output);
|
|
2697
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2670
2698
|
response = new DataExchangeServiceException_1.DataExchangeServiceException({
|
|
2671
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2699
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2672
2700
|
$fault: "client",
|
|
2673
|
-
$metadata
|
|
2701
|
+
$metadata,
|
|
2674
2702
|
});
|
|
2675
2703
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2676
2704
|
}
|
|
@@ -2736,8 +2764,7 @@ const deserializeAws_restJson1UpdateRevisionCommandError = async (output, contex
|
|
|
2736
2764
|
body: await parseBody(output.body, context),
|
|
2737
2765
|
};
|
|
2738
2766
|
let response;
|
|
2739
|
-
|
|
2740
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2767
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2741
2768
|
switch (errorCode) {
|
|
2742
2769
|
case "AccessDeniedException":
|
|
2743
2770
|
case "com.amazonaws.dataexchange#AccessDeniedException":
|
|
@@ -2759,10 +2786,12 @@ const deserializeAws_restJson1UpdateRevisionCommandError = async (output, contex
|
|
|
2759
2786
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2760
2787
|
default:
|
|
2761
2788
|
const parsedBody = parsedOutput.body;
|
|
2789
|
+
const $metadata = deserializeMetadata(output);
|
|
2790
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2762
2791
|
response = new DataExchangeServiceException_1.DataExchangeServiceException({
|
|
2763
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2792
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2764
2793
|
$fault: "client",
|
|
2765
|
-
$metadata
|
|
2794
|
+
$metadata,
|
|
2766
2795
|
});
|
|
2767
2796
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2768
2797
|
}
|
|
@@ -3616,5 +3645,4 @@ const loadRestJsonErrorCode = (output, data) => {
|
|
|
3616
3645
|
if (data["__type"] !== undefined) {
|
|
3617
3646
|
return sanitizeErrorCode(data["__type"]);
|
|
3618
3647
|
}
|
|
3619
|
-
return "";
|
|
3620
3648
|
};
|