@aws-sdk/client-iottwinmaker 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 +130 -105
- package/dist-es/protocols/Aws_restJson1.js +130 -105
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.121.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.120.0...v3.121.0) (2022-06-30)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **clients:** fallback to status code for unmodeled errors ([#3752](https://github.com/aws/aws-sdk-js-v3/issues/3752)) ([49bcc4f](https://github.com/aws/aws-sdk-js-v3/commit/49bcc4f153e890e798a8e82fd5fc397b2dcc449f))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [3.118.1](https://github.com/aws/aws-sdk-js-v3/compare/v3.118.0...v3.118.1) (2022-06-27)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @aws-sdk/client-iottwinmaker
|
|
@@ -1151,8 +1151,7 @@ const deserializeAws_restJson1BatchPutPropertyValuesCommandError = async (output
|
|
|
1151
1151
|
body: await parseBody(output.body, context),
|
|
1152
1152
|
};
|
|
1153
1153
|
let response;
|
|
1154
|
-
|
|
1155
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1154
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1156
1155
|
switch (errorCode) {
|
|
1157
1156
|
case "InternalServerException":
|
|
1158
1157
|
case "com.amazonaws.iottwinmaker#InternalServerException":
|
|
@@ -1168,10 +1167,12 @@ const deserializeAws_restJson1BatchPutPropertyValuesCommandError = async (output
|
|
|
1168
1167
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1169
1168
|
default:
|
|
1170
1169
|
const parsedBody = parsedOutput.body;
|
|
1170
|
+
const $metadata = deserializeMetadata(output);
|
|
1171
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1171
1172
|
response = new IoTTwinMakerServiceException_1.IoTTwinMakerServiceException({
|
|
1172
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1173
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1173
1174
|
$fault: "client",
|
|
1174
|
-
$metadata
|
|
1175
|
+
$metadata,
|
|
1175
1176
|
});
|
|
1176
1177
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1177
1178
|
}
|
|
@@ -1205,8 +1206,7 @@ const deserializeAws_restJson1CreateComponentTypeCommandError = async (output, c
|
|
|
1205
1206
|
body: await parseBody(output.body, context),
|
|
1206
1207
|
};
|
|
1207
1208
|
let response;
|
|
1208
|
-
|
|
1209
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1209
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1210
1210
|
switch (errorCode) {
|
|
1211
1211
|
case "AccessDeniedException":
|
|
1212
1212
|
case "com.amazonaws.iottwinmaker#AccessDeniedException":
|
|
@@ -1228,10 +1228,12 @@ const deserializeAws_restJson1CreateComponentTypeCommandError = async (output, c
|
|
|
1228
1228
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1229
1229
|
default:
|
|
1230
1230
|
const parsedBody = parsedOutput.body;
|
|
1231
|
+
const $metadata = deserializeMetadata(output);
|
|
1232
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1231
1233
|
response = new IoTTwinMakerServiceException_1.IoTTwinMakerServiceException({
|
|
1232
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1234
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1233
1235
|
$fault: "client",
|
|
1234
|
-
$metadata
|
|
1236
|
+
$metadata,
|
|
1235
1237
|
});
|
|
1236
1238
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1237
1239
|
}
|
|
@@ -1269,8 +1271,7 @@ const deserializeAws_restJson1CreateEntityCommandError = async (output, context)
|
|
|
1269
1271
|
body: await parseBody(output.body, context),
|
|
1270
1272
|
};
|
|
1271
1273
|
let response;
|
|
1272
|
-
|
|
1273
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1274
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1274
1275
|
switch (errorCode) {
|
|
1275
1276
|
case "AccessDeniedException":
|
|
1276
1277
|
case "com.amazonaws.iottwinmaker#AccessDeniedException":
|
|
@@ -1292,10 +1293,12 @@ const deserializeAws_restJson1CreateEntityCommandError = async (output, context)
|
|
|
1292
1293
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1293
1294
|
default:
|
|
1294
1295
|
const parsedBody = parsedOutput.body;
|
|
1296
|
+
const $metadata = deserializeMetadata(output);
|
|
1297
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1295
1298
|
response = new IoTTwinMakerServiceException_1.IoTTwinMakerServiceException({
|
|
1296
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1299
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1297
1300
|
$fault: "client",
|
|
1298
|
-
$metadata
|
|
1301
|
+
$metadata,
|
|
1299
1302
|
});
|
|
1300
1303
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1301
1304
|
}
|
|
@@ -1325,8 +1328,7 @@ const deserializeAws_restJson1CreateSceneCommandError = async (output, context)
|
|
|
1325
1328
|
body: await parseBody(output.body, context),
|
|
1326
1329
|
};
|
|
1327
1330
|
let response;
|
|
1328
|
-
|
|
1329
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1331
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1330
1332
|
switch (errorCode) {
|
|
1331
1333
|
case "AccessDeniedException":
|
|
1332
1334
|
case "com.amazonaws.iottwinmaker#AccessDeniedException":
|
|
@@ -1348,10 +1350,12 @@ const deserializeAws_restJson1CreateSceneCommandError = async (output, context)
|
|
|
1348
1350
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1349
1351
|
default:
|
|
1350
1352
|
const parsedBody = parsedOutput.body;
|
|
1353
|
+
const $metadata = deserializeMetadata(output);
|
|
1354
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1351
1355
|
response = new IoTTwinMakerServiceException_1.IoTTwinMakerServiceException({
|
|
1352
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1356
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1353
1357
|
$fault: "client",
|
|
1354
|
-
$metadata
|
|
1358
|
+
$metadata,
|
|
1355
1359
|
});
|
|
1356
1360
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1357
1361
|
}
|
|
@@ -1381,8 +1385,7 @@ const deserializeAws_restJson1CreateWorkspaceCommandError = async (output, conte
|
|
|
1381
1385
|
body: await parseBody(output.body, context),
|
|
1382
1386
|
};
|
|
1383
1387
|
let response;
|
|
1384
|
-
|
|
1385
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1388
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1386
1389
|
switch (errorCode) {
|
|
1387
1390
|
case "AccessDeniedException":
|
|
1388
1391
|
case "com.amazonaws.iottwinmaker#AccessDeniedException":
|
|
@@ -1404,10 +1407,12 @@ const deserializeAws_restJson1CreateWorkspaceCommandError = async (output, conte
|
|
|
1404
1407
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1405
1408
|
default:
|
|
1406
1409
|
const parsedBody = parsedOutput.body;
|
|
1410
|
+
const $metadata = deserializeMetadata(output);
|
|
1411
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1407
1412
|
response = new IoTTwinMakerServiceException_1.IoTTwinMakerServiceException({
|
|
1408
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1413
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1409
1414
|
$fault: "client",
|
|
1410
|
-
$metadata
|
|
1415
|
+
$metadata,
|
|
1411
1416
|
});
|
|
1412
1417
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1413
1418
|
}
|
|
@@ -1433,8 +1438,7 @@ const deserializeAws_restJson1DeleteComponentTypeCommandError = async (output, c
|
|
|
1433
1438
|
body: await parseBody(output.body, context),
|
|
1434
1439
|
};
|
|
1435
1440
|
let response;
|
|
1436
|
-
|
|
1437
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1441
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1438
1442
|
switch (errorCode) {
|
|
1439
1443
|
case "AccessDeniedException":
|
|
1440
1444
|
case "com.amazonaws.iottwinmaker#AccessDeniedException":
|
|
@@ -1453,10 +1457,12 @@ const deserializeAws_restJson1DeleteComponentTypeCommandError = async (output, c
|
|
|
1453
1457
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1454
1458
|
default:
|
|
1455
1459
|
const parsedBody = parsedOutput.body;
|
|
1460
|
+
const $metadata = deserializeMetadata(output);
|
|
1461
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1456
1462
|
response = new IoTTwinMakerServiceException_1.IoTTwinMakerServiceException({
|
|
1457
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1463
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1458
1464
|
$fault: "client",
|
|
1459
|
-
$metadata
|
|
1465
|
+
$metadata,
|
|
1460
1466
|
});
|
|
1461
1467
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1462
1468
|
}
|
|
@@ -1482,8 +1488,7 @@ const deserializeAws_restJson1DeleteEntityCommandError = async (output, context)
|
|
|
1482
1488
|
body: await parseBody(output.body, context),
|
|
1483
1489
|
};
|
|
1484
1490
|
let response;
|
|
1485
|
-
|
|
1486
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1491
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1487
1492
|
switch (errorCode) {
|
|
1488
1493
|
case "InternalServerException":
|
|
1489
1494
|
case "com.amazonaws.iottwinmaker#InternalServerException":
|
|
@@ -1502,10 +1507,12 @@ const deserializeAws_restJson1DeleteEntityCommandError = async (output, context)
|
|
|
1502
1507
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1503
1508
|
default:
|
|
1504
1509
|
const parsedBody = parsedOutput.body;
|
|
1510
|
+
const $metadata = deserializeMetadata(output);
|
|
1511
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1505
1512
|
response = new IoTTwinMakerServiceException_1.IoTTwinMakerServiceException({
|
|
1506
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1513
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1507
1514
|
$fault: "client",
|
|
1508
|
-
$metadata
|
|
1515
|
+
$metadata,
|
|
1509
1516
|
});
|
|
1510
1517
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1511
1518
|
}
|
|
@@ -1527,8 +1534,7 @@ const deserializeAws_restJson1DeleteSceneCommandError = async (output, context)
|
|
|
1527
1534
|
body: await parseBody(output.body, context),
|
|
1528
1535
|
};
|
|
1529
1536
|
let response;
|
|
1530
|
-
|
|
1531
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1537
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1532
1538
|
switch (errorCode) {
|
|
1533
1539
|
case "AccessDeniedException":
|
|
1534
1540
|
case "com.amazonaws.iottwinmaker#AccessDeniedException":
|
|
@@ -1547,10 +1553,12 @@ const deserializeAws_restJson1DeleteSceneCommandError = async (output, context)
|
|
|
1547
1553
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1548
1554
|
default:
|
|
1549
1555
|
const parsedBody = parsedOutput.body;
|
|
1556
|
+
const $metadata = deserializeMetadata(output);
|
|
1557
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1550
1558
|
response = new IoTTwinMakerServiceException_1.IoTTwinMakerServiceException({
|
|
1551
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1559
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1552
1560
|
$fault: "client",
|
|
1553
|
-
$metadata
|
|
1561
|
+
$metadata,
|
|
1554
1562
|
});
|
|
1555
1563
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1556
1564
|
}
|
|
@@ -1572,8 +1580,7 @@ const deserializeAws_restJson1DeleteWorkspaceCommandError = async (output, conte
|
|
|
1572
1580
|
body: await parseBody(output.body, context),
|
|
1573
1581
|
};
|
|
1574
1582
|
let response;
|
|
1575
|
-
|
|
1576
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1583
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1577
1584
|
switch (errorCode) {
|
|
1578
1585
|
case "AccessDeniedException":
|
|
1579
1586
|
case "com.amazonaws.iottwinmaker#AccessDeniedException":
|
|
@@ -1592,10 +1599,12 @@ const deserializeAws_restJson1DeleteWorkspaceCommandError = async (output, conte
|
|
|
1592
1599
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1593
1600
|
default:
|
|
1594
1601
|
const parsedBody = parsedOutput.body;
|
|
1602
|
+
const $metadata = deserializeMetadata(output);
|
|
1603
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1595
1604
|
response = new IoTTwinMakerServiceException_1.IoTTwinMakerServiceException({
|
|
1596
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1605
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1597
1606
|
$fault: "client",
|
|
1598
|
-
$metadata
|
|
1607
|
+
$metadata,
|
|
1599
1608
|
});
|
|
1600
1609
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1601
1610
|
}
|
|
@@ -1669,8 +1678,7 @@ const deserializeAws_restJson1GetComponentTypeCommandError = async (output, cont
|
|
|
1669
1678
|
body: await parseBody(output.body, context),
|
|
1670
1679
|
};
|
|
1671
1680
|
let response;
|
|
1672
|
-
|
|
1673
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1681
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1674
1682
|
switch (errorCode) {
|
|
1675
1683
|
case "AccessDeniedException":
|
|
1676
1684
|
case "com.amazonaws.iottwinmaker#AccessDeniedException":
|
|
@@ -1686,10 +1694,12 @@ const deserializeAws_restJson1GetComponentTypeCommandError = async (output, cont
|
|
|
1686
1694
|
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1687
1695
|
default:
|
|
1688
1696
|
const parsedBody = parsedOutput.body;
|
|
1697
|
+
const $metadata = deserializeMetadata(output);
|
|
1698
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1689
1699
|
response = new IoTTwinMakerServiceException_1.IoTTwinMakerServiceException({
|
|
1690
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1700
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1691
1701
|
$fault: "client",
|
|
1692
|
-
$metadata
|
|
1702
|
+
$metadata,
|
|
1693
1703
|
});
|
|
1694
1704
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1695
1705
|
}
|
|
@@ -1755,8 +1765,7 @@ const deserializeAws_restJson1GetEntityCommandError = async (output, context) =>
|
|
|
1755
1765
|
body: await parseBody(output.body, context),
|
|
1756
1766
|
};
|
|
1757
1767
|
let response;
|
|
1758
|
-
|
|
1759
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1768
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1760
1769
|
switch (errorCode) {
|
|
1761
1770
|
case "InternalServerException":
|
|
1762
1771
|
case "com.amazonaws.iottwinmaker#InternalServerException":
|
|
@@ -1775,10 +1784,12 @@ const deserializeAws_restJson1GetEntityCommandError = async (output, context) =>
|
|
|
1775
1784
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1776
1785
|
default:
|
|
1777
1786
|
const parsedBody = parsedOutput.body;
|
|
1787
|
+
const $metadata = deserializeMetadata(output);
|
|
1788
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1778
1789
|
response = new IoTTwinMakerServiceException_1.IoTTwinMakerServiceException({
|
|
1779
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1790
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1780
1791
|
$fault: "client",
|
|
1781
|
-
$metadata
|
|
1792
|
+
$metadata,
|
|
1782
1793
|
});
|
|
1783
1794
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1784
1795
|
}
|
|
@@ -1804,8 +1815,7 @@ const deserializeAws_restJson1GetPropertyValueCommandError = async (output, cont
|
|
|
1804
1815
|
body: await parseBody(output.body, context),
|
|
1805
1816
|
};
|
|
1806
1817
|
let response;
|
|
1807
|
-
|
|
1808
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1818
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1809
1819
|
switch (errorCode) {
|
|
1810
1820
|
case "AccessDeniedException":
|
|
1811
1821
|
case "com.amazonaws.iottwinmaker#AccessDeniedException":
|
|
@@ -1830,10 +1840,12 @@ const deserializeAws_restJson1GetPropertyValueCommandError = async (output, cont
|
|
|
1830
1840
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1831
1841
|
default:
|
|
1832
1842
|
const parsedBody = parsedOutput.body;
|
|
1843
|
+
const $metadata = deserializeMetadata(output);
|
|
1844
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1833
1845
|
response = new IoTTwinMakerServiceException_1.IoTTwinMakerServiceException({
|
|
1834
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1846
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1835
1847
|
$fault: "client",
|
|
1836
|
-
$metadata
|
|
1848
|
+
$metadata,
|
|
1837
1849
|
});
|
|
1838
1850
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1839
1851
|
}
|
|
@@ -1863,8 +1875,7 @@ const deserializeAws_restJson1GetPropertyValueHistoryCommandError = async (outpu
|
|
|
1863
1875
|
body: await parseBody(output.body, context),
|
|
1864
1876
|
};
|
|
1865
1877
|
let response;
|
|
1866
|
-
|
|
1867
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1878
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1868
1879
|
switch (errorCode) {
|
|
1869
1880
|
case "AccessDeniedException":
|
|
1870
1881
|
case "com.amazonaws.iottwinmaker#AccessDeniedException":
|
|
@@ -1889,10 +1900,12 @@ const deserializeAws_restJson1GetPropertyValueHistoryCommandError = async (outpu
|
|
|
1889
1900
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1890
1901
|
default:
|
|
1891
1902
|
const parsedBody = parsedOutput.body;
|
|
1903
|
+
const $metadata = deserializeMetadata(output);
|
|
1904
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1892
1905
|
response = new IoTTwinMakerServiceException_1.IoTTwinMakerServiceException({
|
|
1893
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1906
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1894
1907
|
$fault: "client",
|
|
1895
|
-
$metadata
|
|
1908
|
+
$metadata,
|
|
1896
1909
|
});
|
|
1897
1910
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1898
1911
|
}
|
|
@@ -1946,8 +1959,7 @@ const deserializeAws_restJson1GetSceneCommandError = async (output, context) =>
|
|
|
1946
1959
|
body: await parseBody(output.body, context),
|
|
1947
1960
|
};
|
|
1948
1961
|
let response;
|
|
1949
|
-
|
|
1950
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1962
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1951
1963
|
switch (errorCode) {
|
|
1952
1964
|
case "AccessDeniedException":
|
|
1953
1965
|
case "com.amazonaws.iottwinmaker#AccessDeniedException":
|
|
@@ -1966,10 +1978,12 @@ const deserializeAws_restJson1GetSceneCommandError = async (output, context) =>
|
|
|
1966
1978
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1967
1979
|
default:
|
|
1968
1980
|
const parsedBody = parsedOutput.body;
|
|
1981
|
+
const $metadata = deserializeMetadata(output);
|
|
1982
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1969
1983
|
response = new IoTTwinMakerServiceException_1.IoTTwinMakerServiceException({
|
|
1970
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1984
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1971
1985
|
$fault: "client",
|
|
1972
|
-
$metadata
|
|
1986
|
+
$metadata,
|
|
1973
1987
|
});
|
|
1974
1988
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1975
1989
|
}
|
|
@@ -2019,8 +2033,7 @@ const deserializeAws_restJson1GetWorkspaceCommandError = async (output, context)
|
|
|
2019
2033
|
body: await parseBody(output.body, context),
|
|
2020
2034
|
};
|
|
2021
2035
|
let response;
|
|
2022
|
-
|
|
2023
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2036
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2024
2037
|
switch (errorCode) {
|
|
2025
2038
|
case "InternalServerException":
|
|
2026
2039
|
case "com.amazonaws.iottwinmaker#InternalServerException":
|
|
@@ -2039,10 +2052,12 @@ const deserializeAws_restJson1GetWorkspaceCommandError = async (output, context)
|
|
|
2039
2052
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2040
2053
|
default:
|
|
2041
2054
|
const parsedBody = parsedOutput.body;
|
|
2055
|
+
const $metadata = deserializeMetadata(output);
|
|
2056
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2042
2057
|
response = new IoTTwinMakerServiceException_1.IoTTwinMakerServiceException({
|
|
2043
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2058
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2044
2059
|
$fault: "client",
|
|
2045
|
-
$metadata
|
|
2060
|
+
$metadata,
|
|
2046
2061
|
});
|
|
2047
2062
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2048
2063
|
}
|
|
@@ -2080,8 +2095,7 @@ const deserializeAws_restJson1ListComponentTypesCommandError = async (output, co
|
|
|
2080
2095
|
body: await parseBody(output.body, context),
|
|
2081
2096
|
};
|
|
2082
2097
|
let response;
|
|
2083
|
-
|
|
2084
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2098
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2085
2099
|
switch (errorCode) {
|
|
2086
2100
|
case "AccessDeniedException":
|
|
2087
2101
|
case "com.amazonaws.iottwinmaker#AccessDeniedException":
|
|
@@ -2097,10 +2111,12 @@ const deserializeAws_restJson1ListComponentTypesCommandError = async (output, co
|
|
|
2097
2111
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2098
2112
|
default:
|
|
2099
2113
|
const parsedBody = parsedOutput.body;
|
|
2114
|
+
const $metadata = deserializeMetadata(output);
|
|
2115
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2100
2116
|
response = new IoTTwinMakerServiceException_1.IoTTwinMakerServiceException({
|
|
2101
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2117
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2102
2118
|
$fault: "client",
|
|
2103
|
-
$metadata
|
|
2119
|
+
$metadata,
|
|
2104
2120
|
});
|
|
2105
2121
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2106
2122
|
}
|
|
@@ -2130,8 +2146,7 @@ const deserializeAws_restJson1ListEntitiesCommandError = async (output, context)
|
|
|
2130
2146
|
body: await parseBody(output.body, context),
|
|
2131
2147
|
};
|
|
2132
2148
|
let response;
|
|
2133
|
-
|
|
2134
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2149
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2135
2150
|
switch (errorCode) {
|
|
2136
2151
|
case "InternalServerException":
|
|
2137
2152
|
case "com.amazonaws.iottwinmaker#InternalServerException":
|
|
@@ -2147,10 +2162,12 @@ const deserializeAws_restJson1ListEntitiesCommandError = async (output, context)
|
|
|
2147
2162
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2148
2163
|
default:
|
|
2149
2164
|
const parsedBody = parsedOutput.body;
|
|
2165
|
+
const $metadata = deserializeMetadata(output);
|
|
2166
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2150
2167
|
response = new IoTTwinMakerServiceException_1.IoTTwinMakerServiceException({
|
|
2151
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2168
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2152
2169
|
$fault: "client",
|
|
2153
|
-
$metadata
|
|
2170
|
+
$metadata,
|
|
2154
2171
|
});
|
|
2155
2172
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2156
2173
|
}
|
|
@@ -2180,8 +2197,7 @@ const deserializeAws_restJson1ListScenesCommandError = async (output, context) =
|
|
|
2180
2197
|
body: await parseBody(output.body, context),
|
|
2181
2198
|
};
|
|
2182
2199
|
let response;
|
|
2183
|
-
|
|
2184
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2200
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2185
2201
|
switch (errorCode) {
|
|
2186
2202
|
case "AccessDeniedException":
|
|
2187
2203
|
case "com.amazonaws.iottwinmaker#AccessDeniedException":
|
|
@@ -2197,10 +2213,12 @@ const deserializeAws_restJson1ListScenesCommandError = async (output, context) =
|
|
|
2197
2213
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2198
2214
|
default:
|
|
2199
2215
|
const parsedBody = parsedOutput.body;
|
|
2216
|
+
const $metadata = deserializeMetadata(output);
|
|
2217
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2200
2218
|
response = new IoTTwinMakerServiceException_1.IoTTwinMakerServiceException({
|
|
2201
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2219
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2202
2220
|
$fault: "client",
|
|
2203
|
-
$metadata
|
|
2221
|
+
$metadata,
|
|
2204
2222
|
});
|
|
2205
2223
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2206
2224
|
}
|
|
@@ -2230,8 +2248,7 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
2230
2248
|
body: await parseBody(output.body, context),
|
|
2231
2249
|
};
|
|
2232
2250
|
let response;
|
|
2233
|
-
|
|
2234
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2251
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2235
2252
|
switch (errorCode) {
|
|
2236
2253
|
case "AccessDeniedException":
|
|
2237
2254
|
case "com.amazonaws.iottwinmaker#AccessDeniedException":
|
|
@@ -2241,10 +2258,12 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
2241
2258
|
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
2242
2259
|
default:
|
|
2243
2260
|
const parsedBody = parsedOutput.body;
|
|
2261
|
+
const $metadata = deserializeMetadata(output);
|
|
2262
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2244
2263
|
response = new IoTTwinMakerServiceException_1.IoTTwinMakerServiceException({
|
|
2245
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2264
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2246
2265
|
$fault: "client",
|
|
2247
|
-
$metadata
|
|
2266
|
+
$metadata,
|
|
2248
2267
|
});
|
|
2249
2268
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2250
2269
|
}
|
|
@@ -2274,8 +2293,7 @@ const deserializeAws_restJson1ListWorkspacesCommandError = async (output, contex
|
|
|
2274
2293
|
body: await parseBody(output.body, context),
|
|
2275
2294
|
};
|
|
2276
2295
|
let response;
|
|
2277
|
-
|
|
2278
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2296
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2279
2297
|
switch (errorCode) {
|
|
2280
2298
|
case "InternalServerException":
|
|
2281
2299
|
case "com.amazonaws.iottwinmaker#InternalServerException":
|
|
@@ -2291,10 +2309,12 @@ const deserializeAws_restJson1ListWorkspacesCommandError = async (output, contex
|
|
|
2291
2309
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2292
2310
|
default:
|
|
2293
2311
|
const parsedBody = parsedOutput.body;
|
|
2312
|
+
const $metadata = deserializeMetadata(output);
|
|
2313
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2294
2314
|
response = new IoTTwinMakerServiceException_1.IoTTwinMakerServiceException({
|
|
2295
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2315
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2296
2316
|
$fault: "client",
|
|
2297
|
-
$metadata
|
|
2317
|
+
$metadata,
|
|
2298
2318
|
});
|
|
2299
2319
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2300
2320
|
}
|
|
@@ -2316,8 +2336,7 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
2316
2336
|
body: await parseBody(output.body, context),
|
|
2317
2337
|
};
|
|
2318
2338
|
let response;
|
|
2319
|
-
|
|
2320
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2339
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2321
2340
|
switch (errorCode) {
|
|
2322
2341
|
case "AccessDeniedException":
|
|
2323
2342
|
case "com.amazonaws.iottwinmaker#AccessDeniedException":
|
|
@@ -2330,10 +2349,12 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
2330
2349
|
throw await deserializeAws_restJson1TooManyTagsExceptionResponse(parsedOutput, context);
|
|
2331
2350
|
default:
|
|
2332
2351
|
const parsedBody = parsedOutput.body;
|
|
2352
|
+
const $metadata = deserializeMetadata(output);
|
|
2353
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2333
2354
|
response = new IoTTwinMakerServiceException_1.IoTTwinMakerServiceException({
|
|
2334
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2355
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2335
2356
|
$fault: "client",
|
|
2336
|
-
$metadata
|
|
2357
|
+
$metadata,
|
|
2337
2358
|
});
|
|
2338
2359
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2339
2360
|
}
|
|
@@ -2355,8 +2376,7 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
2355
2376
|
body: await parseBody(output.body, context),
|
|
2356
2377
|
};
|
|
2357
2378
|
let response;
|
|
2358
|
-
|
|
2359
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2379
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2360
2380
|
switch (errorCode) {
|
|
2361
2381
|
case "AccessDeniedException":
|
|
2362
2382
|
case "com.amazonaws.iottwinmaker#AccessDeniedException":
|
|
@@ -2366,10 +2386,12 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
2366
2386
|
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
2367
2387
|
default:
|
|
2368
2388
|
const parsedBody = parsedOutput.body;
|
|
2389
|
+
const $metadata = deserializeMetadata(output);
|
|
2390
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2369
2391
|
response = new IoTTwinMakerServiceException_1.IoTTwinMakerServiceException({
|
|
2370
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2392
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2371
2393
|
$fault: "client",
|
|
2372
|
-
$metadata
|
|
2394
|
+
$metadata,
|
|
2373
2395
|
});
|
|
2374
2396
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2375
2397
|
}
|
|
@@ -2407,8 +2429,7 @@ const deserializeAws_restJson1UpdateComponentTypeCommandError = async (output, c
|
|
|
2407
2429
|
body: await parseBody(output.body, context),
|
|
2408
2430
|
};
|
|
2409
2431
|
let response;
|
|
2410
|
-
|
|
2411
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2432
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2412
2433
|
switch (errorCode) {
|
|
2413
2434
|
case "AccessDeniedException":
|
|
2414
2435
|
case "com.amazonaws.iottwinmaker#AccessDeniedException":
|
|
@@ -2430,10 +2451,12 @@ const deserializeAws_restJson1UpdateComponentTypeCommandError = async (output, c
|
|
|
2430
2451
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2431
2452
|
default:
|
|
2432
2453
|
const parsedBody = parsedOutput.body;
|
|
2454
|
+
const $metadata = deserializeMetadata(output);
|
|
2455
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2433
2456
|
response = new IoTTwinMakerServiceException_1.IoTTwinMakerServiceException({
|
|
2434
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2457
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2435
2458
|
$fault: "client",
|
|
2436
|
-
$metadata
|
|
2459
|
+
$metadata,
|
|
2437
2460
|
});
|
|
2438
2461
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2439
2462
|
}
|
|
@@ -2463,8 +2486,7 @@ const deserializeAws_restJson1UpdateEntityCommandError = async (output, context)
|
|
|
2463
2486
|
body: await parseBody(output.body, context),
|
|
2464
2487
|
};
|
|
2465
2488
|
let response;
|
|
2466
|
-
|
|
2467
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2489
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2468
2490
|
switch (errorCode) {
|
|
2469
2491
|
case "AccessDeniedException":
|
|
2470
2492
|
case "com.amazonaws.iottwinmaker#AccessDeniedException":
|
|
@@ -2489,10 +2511,12 @@ const deserializeAws_restJson1UpdateEntityCommandError = async (output, context)
|
|
|
2489
2511
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2490
2512
|
default:
|
|
2491
2513
|
const parsedBody = parsedOutput.body;
|
|
2514
|
+
const $metadata = deserializeMetadata(output);
|
|
2515
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2492
2516
|
response = new IoTTwinMakerServiceException_1.IoTTwinMakerServiceException({
|
|
2493
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2517
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2494
2518
|
$fault: "client",
|
|
2495
|
-
$metadata
|
|
2519
|
+
$metadata,
|
|
2496
2520
|
});
|
|
2497
2521
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2498
2522
|
}
|
|
@@ -2518,8 +2542,7 @@ const deserializeAws_restJson1UpdateSceneCommandError = async (output, context)
|
|
|
2518
2542
|
body: await parseBody(output.body, context),
|
|
2519
2543
|
};
|
|
2520
2544
|
let response;
|
|
2521
|
-
|
|
2522
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2545
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2523
2546
|
switch (errorCode) {
|
|
2524
2547
|
case "AccessDeniedException":
|
|
2525
2548
|
case "com.amazonaws.iottwinmaker#AccessDeniedException":
|
|
@@ -2538,10 +2561,12 @@ const deserializeAws_restJson1UpdateSceneCommandError = async (output, context)
|
|
|
2538
2561
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2539
2562
|
default:
|
|
2540
2563
|
const parsedBody = parsedOutput.body;
|
|
2564
|
+
const $metadata = deserializeMetadata(output);
|
|
2565
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2541
2566
|
response = new IoTTwinMakerServiceException_1.IoTTwinMakerServiceException({
|
|
2542
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2567
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2543
2568
|
$fault: "client",
|
|
2544
|
-
$metadata
|
|
2569
|
+
$metadata,
|
|
2545
2570
|
});
|
|
2546
2571
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2547
2572
|
}
|
|
@@ -2567,8 +2592,7 @@ const deserializeAws_restJson1UpdateWorkspaceCommandError = async (output, conte
|
|
|
2567
2592
|
body: await parseBody(output.body, context),
|
|
2568
2593
|
};
|
|
2569
2594
|
let response;
|
|
2570
|
-
|
|
2571
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2595
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2572
2596
|
switch (errorCode) {
|
|
2573
2597
|
case "AccessDeniedException":
|
|
2574
2598
|
case "com.amazonaws.iottwinmaker#AccessDeniedException":
|
|
@@ -2590,10 +2614,12 @@ const deserializeAws_restJson1UpdateWorkspaceCommandError = async (output, conte
|
|
|
2590
2614
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2591
2615
|
default:
|
|
2592
2616
|
const parsedBody = parsedOutput.body;
|
|
2617
|
+
const $metadata = deserializeMetadata(output);
|
|
2618
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2593
2619
|
response = new IoTTwinMakerServiceException_1.IoTTwinMakerServiceException({
|
|
2594
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2620
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2595
2621
|
$fault: "client",
|
|
2596
|
-
$metadata
|
|
2622
|
+
$metadata,
|
|
2597
2623
|
});
|
|
2598
2624
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2599
2625
|
}
|
|
@@ -3661,5 +3687,4 @@ const loadRestJsonErrorCode = (output, data) => {
|
|
|
3661
3687
|
if (data["__type"] !== undefined) {
|
|
3662
3688
|
return sanitizeErrorCode(data["__type"]);
|
|
3663
3689
|
}
|
|
3664
|
-
return "";
|
|
3665
3690
|
};
|