@aws-sdk/client-greengrassv2 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 +145 -117
- package/dist-es/protocols/Aws_restJson1.js +145 -117
- package/package.json +6 -6
|
@@ -849,8 +849,7 @@ const deserializeAws_restJson1AssociateServiceRoleToAccountCommandError = async
|
|
|
849
849
|
body: await parseBody(output.body, context),
|
|
850
850
|
};
|
|
851
851
|
let response;
|
|
852
|
-
|
|
853
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
852
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
854
853
|
switch (errorCode) {
|
|
855
854
|
case "InternalServerException":
|
|
856
855
|
case "com.amazonaws.greengrassv2#InternalServerException":
|
|
@@ -860,10 +859,12 @@ const deserializeAws_restJson1AssociateServiceRoleToAccountCommandError = async
|
|
|
860
859
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
861
860
|
default:
|
|
862
861
|
const parsedBody = parsedOutput.body;
|
|
862
|
+
const $metadata = deserializeMetadata(output);
|
|
863
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
863
864
|
response = new GreengrassV2ServiceException_1.GreengrassV2ServiceException({
|
|
864
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
865
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
865
866
|
$fault: "client",
|
|
866
|
-
$metadata
|
|
867
|
+
$metadata,
|
|
867
868
|
});
|
|
868
869
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
869
870
|
}
|
|
@@ -889,8 +890,7 @@ const deserializeAws_restJson1BatchAssociateClientDeviceWithCoreDeviceCommandErr
|
|
|
889
890
|
body: await parseBody(output.body, context),
|
|
890
891
|
};
|
|
891
892
|
let response;
|
|
892
|
-
|
|
893
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
893
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
894
894
|
switch (errorCode) {
|
|
895
895
|
case "AccessDeniedException":
|
|
896
896
|
case "com.amazonaws.greengrassv2#AccessDeniedException":
|
|
@@ -909,10 +909,12 @@ const deserializeAws_restJson1BatchAssociateClientDeviceWithCoreDeviceCommandErr
|
|
|
909
909
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
910
910
|
default:
|
|
911
911
|
const parsedBody = parsedOutput.body;
|
|
912
|
+
const $metadata = deserializeMetadata(output);
|
|
913
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
912
914
|
response = new GreengrassV2ServiceException_1.GreengrassV2ServiceException({
|
|
913
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
915
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
914
916
|
$fault: "client",
|
|
915
|
-
$metadata
|
|
917
|
+
$metadata,
|
|
916
918
|
});
|
|
917
919
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
918
920
|
}
|
|
@@ -938,8 +940,7 @@ const deserializeAws_restJson1BatchDisassociateClientDeviceFromCoreDeviceCommand
|
|
|
938
940
|
body: await parseBody(output.body, context),
|
|
939
941
|
};
|
|
940
942
|
let response;
|
|
941
|
-
|
|
942
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
943
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
943
944
|
switch (errorCode) {
|
|
944
945
|
case "AccessDeniedException":
|
|
945
946
|
case "com.amazonaws.greengrassv2#AccessDeniedException":
|
|
@@ -958,10 +959,12 @@ const deserializeAws_restJson1BatchDisassociateClientDeviceFromCoreDeviceCommand
|
|
|
958
959
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
959
960
|
default:
|
|
960
961
|
const parsedBody = parsedOutput.body;
|
|
962
|
+
const $metadata = deserializeMetadata(output);
|
|
963
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
961
964
|
response = new GreengrassV2ServiceException_1.GreengrassV2ServiceException({
|
|
962
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
965
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
963
966
|
$fault: "client",
|
|
964
|
-
$metadata
|
|
967
|
+
$metadata,
|
|
965
968
|
});
|
|
966
969
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
967
970
|
}
|
|
@@ -987,8 +990,7 @@ const deserializeAws_restJson1CancelDeploymentCommandError = async (output, cont
|
|
|
987
990
|
body: await parseBody(output.body, context),
|
|
988
991
|
};
|
|
989
992
|
let response;
|
|
990
|
-
|
|
991
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
993
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
992
994
|
switch (errorCode) {
|
|
993
995
|
case "AccessDeniedException":
|
|
994
996
|
case "com.amazonaws.greengrassv2#AccessDeniedException":
|
|
@@ -1010,10 +1012,12 @@ const deserializeAws_restJson1CancelDeploymentCommandError = async (output, cont
|
|
|
1010
1012
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1011
1013
|
default:
|
|
1012
1014
|
const parsedBody = parsedOutput.body;
|
|
1015
|
+
const $metadata = deserializeMetadata(output);
|
|
1016
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1013
1017
|
response = new GreengrassV2ServiceException_1.GreengrassV2ServiceException({
|
|
1014
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1018
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1015
1019
|
$fault: "client",
|
|
1016
|
-
$metadata
|
|
1020
|
+
$metadata,
|
|
1017
1021
|
});
|
|
1018
1022
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1019
1023
|
}
|
|
@@ -1055,8 +1059,7 @@ const deserializeAws_restJson1CreateComponentVersionCommandError = async (output
|
|
|
1055
1059
|
body: await parseBody(output.body, context),
|
|
1056
1060
|
};
|
|
1057
1061
|
let response;
|
|
1058
|
-
|
|
1059
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1062
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1060
1063
|
switch (errorCode) {
|
|
1061
1064
|
case "AccessDeniedException":
|
|
1062
1065
|
case "com.amazonaws.greengrassv2#AccessDeniedException":
|
|
@@ -1081,10 +1084,12 @@ const deserializeAws_restJson1CreateComponentVersionCommandError = async (output
|
|
|
1081
1084
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1082
1085
|
default:
|
|
1083
1086
|
const parsedBody = parsedOutput.body;
|
|
1087
|
+
const $metadata = deserializeMetadata(output);
|
|
1088
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1084
1089
|
response = new GreengrassV2ServiceException_1.GreengrassV2ServiceException({
|
|
1085
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1090
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1086
1091
|
$fault: "client",
|
|
1087
|
-
$metadata
|
|
1092
|
+
$metadata,
|
|
1088
1093
|
});
|
|
1089
1094
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1090
1095
|
}
|
|
@@ -1118,8 +1123,7 @@ const deserializeAws_restJson1CreateDeploymentCommandError = async (output, cont
|
|
|
1118
1123
|
body: await parseBody(output.body, context),
|
|
1119
1124
|
};
|
|
1120
1125
|
let response;
|
|
1121
|
-
|
|
1122
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1126
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1123
1127
|
switch (errorCode) {
|
|
1124
1128
|
case "AccessDeniedException":
|
|
1125
1129
|
case "com.amazonaws.greengrassv2#AccessDeniedException":
|
|
@@ -1144,10 +1148,12 @@ const deserializeAws_restJson1CreateDeploymentCommandError = async (output, cont
|
|
|
1144
1148
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1145
1149
|
default:
|
|
1146
1150
|
const parsedBody = parsedOutput.body;
|
|
1151
|
+
const $metadata = deserializeMetadata(output);
|
|
1152
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1147
1153
|
response = new GreengrassV2ServiceException_1.GreengrassV2ServiceException({
|
|
1148
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1154
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1149
1155
|
$fault: "client",
|
|
1150
|
-
$metadata
|
|
1156
|
+
$metadata,
|
|
1151
1157
|
});
|
|
1152
1158
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1153
1159
|
}
|
|
@@ -1169,8 +1175,7 @@ const deserializeAws_restJson1DeleteComponentCommandError = async (output, conte
|
|
|
1169
1175
|
body: await parseBody(output.body, context),
|
|
1170
1176
|
};
|
|
1171
1177
|
let response;
|
|
1172
|
-
|
|
1173
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1178
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1174
1179
|
switch (errorCode) {
|
|
1175
1180
|
case "AccessDeniedException":
|
|
1176
1181
|
case "com.amazonaws.greengrassv2#AccessDeniedException":
|
|
@@ -1192,10 +1197,12 @@ const deserializeAws_restJson1DeleteComponentCommandError = async (output, conte
|
|
|
1192
1197
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1193
1198
|
default:
|
|
1194
1199
|
const parsedBody = parsedOutput.body;
|
|
1200
|
+
const $metadata = deserializeMetadata(output);
|
|
1201
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1195
1202
|
response = new GreengrassV2ServiceException_1.GreengrassV2ServiceException({
|
|
1196
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1203
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1197
1204
|
$fault: "client",
|
|
1198
|
-
$metadata
|
|
1205
|
+
$metadata,
|
|
1199
1206
|
});
|
|
1200
1207
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1201
1208
|
}
|
|
@@ -1217,8 +1224,7 @@ const deserializeAws_restJson1DeleteCoreDeviceCommandError = async (output, cont
|
|
|
1217
1224
|
body: await parseBody(output.body, context),
|
|
1218
1225
|
};
|
|
1219
1226
|
let response;
|
|
1220
|
-
|
|
1221
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1227
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1222
1228
|
switch (errorCode) {
|
|
1223
1229
|
case "AccessDeniedException":
|
|
1224
1230
|
case "com.amazonaws.greengrassv2#AccessDeniedException":
|
|
@@ -1240,10 +1246,12 @@ const deserializeAws_restJson1DeleteCoreDeviceCommandError = async (output, cont
|
|
|
1240
1246
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1241
1247
|
default:
|
|
1242
1248
|
const parsedBody = parsedOutput.body;
|
|
1249
|
+
const $metadata = deserializeMetadata(output);
|
|
1250
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1243
1251
|
response = new GreengrassV2ServiceException_1.GreengrassV2ServiceException({
|
|
1244
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1252
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1245
1253
|
$fault: "client",
|
|
1246
|
-
$metadata
|
|
1254
|
+
$metadata,
|
|
1247
1255
|
});
|
|
1248
1256
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1249
1257
|
}
|
|
@@ -1265,8 +1273,7 @@ const deserializeAws_restJson1DeleteDeploymentCommandError = async (output, cont
|
|
|
1265
1273
|
body: await parseBody(output.body, context),
|
|
1266
1274
|
};
|
|
1267
1275
|
let response;
|
|
1268
|
-
|
|
1269
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1276
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1270
1277
|
switch (errorCode) {
|
|
1271
1278
|
case "AccessDeniedException":
|
|
1272
1279
|
case "com.amazonaws.greengrassv2#AccessDeniedException":
|
|
@@ -1288,10 +1295,12 @@ const deserializeAws_restJson1DeleteDeploymentCommandError = async (output, cont
|
|
|
1288
1295
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1289
1296
|
default:
|
|
1290
1297
|
const parsedBody = parsedOutput.body;
|
|
1298
|
+
const $metadata = deserializeMetadata(output);
|
|
1299
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1291
1300
|
response = new GreengrassV2ServiceException_1.GreengrassV2ServiceException({
|
|
1292
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1301
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1293
1302
|
$fault: "client",
|
|
1294
|
-
$metadata
|
|
1303
|
+
$metadata,
|
|
1295
1304
|
});
|
|
1296
1305
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1297
1306
|
}
|
|
@@ -1349,8 +1358,7 @@ const deserializeAws_restJson1DescribeComponentCommandError = async (output, con
|
|
|
1349
1358
|
body: await parseBody(output.body, context),
|
|
1350
1359
|
};
|
|
1351
1360
|
let response;
|
|
1352
|
-
|
|
1353
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1361
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1354
1362
|
switch (errorCode) {
|
|
1355
1363
|
case "AccessDeniedException":
|
|
1356
1364
|
case "com.amazonaws.greengrassv2#AccessDeniedException":
|
|
@@ -1369,10 +1377,12 @@ const deserializeAws_restJson1DescribeComponentCommandError = async (output, con
|
|
|
1369
1377
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1370
1378
|
default:
|
|
1371
1379
|
const parsedBody = parsedOutput.body;
|
|
1380
|
+
const $metadata = deserializeMetadata(output);
|
|
1381
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1372
1382
|
response = new GreengrassV2ServiceException_1.GreengrassV2ServiceException({
|
|
1373
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1383
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1374
1384
|
$fault: "client",
|
|
1375
|
-
$metadata
|
|
1385
|
+
$metadata,
|
|
1376
1386
|
});
|
|
1377
1387
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1378
1388
|
}
|
|
@@ -1398,18 +1408,19 @@ const deserializeAws_restJson1DisassociateServiceRoleFromAccountCommandError = a
|
|
|
1398
1408
|
body: await parseBody(output.body, context),
|
|
1399
1409
|
};
|
|
1400
1410
|
let response;
|
|
1401
|
-
|
|
1402
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1411
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1403
1412
|
switch (errorCode) {
|
|
1404
1413
|
case "InternalServerException":
|
|
1405
1414
|
case "com.amazonaws.greengrassv2#InternalServerException":
|
|
1406
1415
|
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1407
1416
|
default:
|
|
1408
1417
|
const parsedBody = parsedOutput.body;
|
|
1418
|
+
const $metadata = deserializeMetadata(output);
|
|
1419
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1409
1420
|
response = new GreengrassV2ServiceException_1.GreengrassV2ServiceException({
|
|
1410
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1421
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1411
1422
|
$fault: "client",
|
|
1412
|
-
$metadata
|
|
1423
|
+
$metadata,
|
|
1413
1424
|
});
|
|
1414
1425
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1415
1426
|
}
|
|
@@ -1443,8 +1454,7 @@ const deserializeAws_restJson1GetComponentCommandError = async (output, context)
|
|
|
1443
1454
|
body: await parseBody(output.body, context),
|
|
1444
1455
|
};
|
|
1445
1456
|
let response;
|
|
1446
|
-
|
|
1447
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1457
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1448
1458
|
switch (errorCode) {
|
|
1449
1459
|
case "AccessDeniedException":
|
|
1450
1460
|
case "com.amazonaws.greengrassv2#AccessDeniedException":
|
|
@@ -1463,10 +1473,12 @@ const deserializeAws_restJson1GetComponentCommandError = async (output, context)
|
|
|
1463
1473
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1464
1474
|
default:
|
|
1465
1475
|
const parsedBody = parsedOutput.body;
|
|
1476
|
+
const $metadata = deserializeMetadata(output);
|
|
1477
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1466
1478
|
response = new GreengrassV2ServiceException_1.GreengrassV2ServiceException({
|
|
1467
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1479
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1468
1480
|
$fault: "client",
|
|
1469
|
-
$metadata
|
|
1481
|
+
$metadata,
|
|
1470
1482
|
});
|
|
1471
1483
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1472
1484
|
}
|
|
@@ -1492,8 +1504,7 @@ const deserializeAws_restJson1GetComponentVersionArtifactCommandError = async (o
|
|
|
1492
1504
|
body: await parseBody(output.body, context),
|
|
1493
1505
|
};
|
|
1494
1506
|
let response;
|
|
1495
|
-
|
|
1496
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1507
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1497
1508
|
switch (errorCode) {
|
|
1498
1509
|
case "AccessDeniedException":
|
|
1499
1510
|
case "com.amazonaws.greengrassv2#AccessDeniedException":
|
|
@@ -1512,10 +1523,12 @@ const deserializeAws_restJson1GetComponentVersionArtifactCommandError = async (o
|
|
|
1512
1523
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1513
1524
|
default:
|
|
1514
1525
|
const parsedBody = parsedOutput.body;
|
|
1526
|
+
const $metadata = deserializeMetadata(output);
|
|
1527
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1515
1528
|
response = new GreengrassV2ServiceException_1.GreengrassV2ServiceException({
|
|
1516
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1529
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1517
1530
|
$fault: "client",
|
|
1518
|
-
$metadata
|
|
1531
|
+
$metadata,
|
|
1519
1532
|
});
|
|
1520
1533
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1521
1534
|
}
|
|
@@ -1545,8 +1558,7 @@ const deserializeAws_restJson1GetConnectivityInfoCommandError = async (output, c
|
|
|
1545
1558
|
body: await parseBody(output.body, context),
|
|
1546
1559
|
};
|
|
1547
1560
|
let response;
|
|
1548
|
-
|
|
1549
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1561
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1550
1562
|
switch (errorCode) {
|
|
1551
1563
|
case "InternalServerException":
|
|
1552
1564
|
case "com.amazonaws.greengrassv2#InternalServerException":
|
|
@@ -1556,10 +1568,12 @@ const deserializeAws_restJson1GetConnectivityInfoCommandError = async (output, c
|
|
|
1556
1568
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1557
1569
|
default:
|
|
1558
1570
|
const parsedBody = parsedOutput.body;
|
|
1571
|
+
const $metadata = deserializeMetadata(output);
|
|
1572
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1559
1573
|
response = new GreengrassV2ServiceException_1.GreengrassV2ServiceException({
|
|
1560
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1574
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1561
1575
|
$fault: "client",
|
|
1562
|
-
$metadata
|
|
1576
|
+
$metadata,
|
|
1563
1577
|
});
|
|
1564
1578
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1565
1579
|
}
|
|
@@ -1609,8 +1623,7 @@ const deserializeAws_restJson1GetCoreDeviceCommandError = async (output, context
|
|
|
1609
1623
|
body: await parseBody(output.body, context),
|
|
1610
1624
|
};
|
|
1611
1625
|
let response;
|
|
1612
|
-
|
|
1613
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1626
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1614
1627
|
switch (errorCode) {
|
|
1615
1628
|
case "AccessDeniedException":
|
|
1616
1629
|
case "com.amazonaws.greengrassv2#AccessDeniedException":
|
|
@@ -1629,10 +1642,12 @@ const deserializeAws_restJson1GetCoreDeviceCommandError = async (output, context
|
|
|
1629
1642
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1630
1643
|
default:
|
|
1631
1644
|
const parsedBody = parsedOutput.body;
|
|
1645
|
+
const $metadata = deserializeMetadata(output);
|
|
1646
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1632
1647
|
response = new GreengrassV2ServiceException_1.GreengrassV2ServiceException({
|
|
1633
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1648
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1634
1649
|
$fault: "client",
|
|
1635
|
-
$metadata
|
|
1650
|
+
$metadata,
|
|
1636
1651
|
});
|
|
1637
1652
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1638
1653
|
}
|
|
@@ -1706,8 +1721,7 @@ const deserializeAws_restJson1GetDeploymentCommandError = async (output, context
|
|
|
1706
1721
|
body: await parseBody(output.body, context),
|
|
1707
1722
|
};
|
|
1708
1723
|
let response;
|
|
1709
|
-
|
|
1710
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1724
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1711
1725
|
switch (errorCode) {
|
|
1712
1726
|
case "AccessDeniedException":
|
|
1713
1727
|
case "com.amazonaws.greengrassv2#AccessDeniedException":
|
|
@@ -1726,10 +1740,12 @@ const deserializeAws_restJson1GetDeploymentCommandError = async (output, context
|
|
|
1726
1740
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1727
1741
|
default:
|
|
1728
1742
|
const parsedBody = parsedOutput.body;
|
|
1743
|
+
const $metadata = deserializeMetadata(output);
|
|
1744
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1729
1745
|
response = new GreengrassV2ServiceException_1.GreengrassV2ServiceException({
|
|
1730
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1746
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1731
1747
|
$fault: "client",
|
|
1732
|
-
$metadata
|
|
1748
|
+
$metadata,
|
|
1733
1749
|
});
|
|
1734
1750
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1735
1751
|
}
|
|
@@ -1759,18 +1775,19 @@ const deserializeAws_restJson1GetServiceRoleForAccountCommandError = async (outp
|
|
|
1759
1775
|
body: await parseBody(output.body, context),
|
|
1760
1776
|
};
|
|
1761
1777
|
let response;
|
|
1762
|
-
|
|
1763
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1778
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1764
1779
|
switch (errorCode) {
|
|
1765
1780
|
case "InternalServerException":
|
|
1766
1781
|
case "com.amazonaws.greengrassv2#InternalServerException":
|
|
1767
1782
|
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1768
1783
|
default:
|
|
1769
1784
|
const parsedBody = parsedOutput.body;
|
|
1785
|
+
const $metadata = deserializeMetadata(output);
|
|
1786
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1770
1787
|
response = new GreengrassV2ServiceException_1.GreengrassV2ServiceException({
|
|
1771
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1788
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1772
1789
|
$fault: "client",
|
|
1773
|
-
$metadata
|
|
1790
|
+
$metadata,
|
|
1774
1791
|
});
|
|
1775
1792
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1776
1793
|
}
|
|
@@ -1800,8 +1817,7 @@ const deserializeAws_restJson1ListClientDevicesAssociatedWithCoreDeviceCommandEr
|
|
|
1800
1817
|
body: await parseBody(output.body, context),
|
|
1801
1818
|
};
|
|
1802
1819
|
let response;
|
|
1803
|
-
|
|
1804
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1820
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1805
1821
|
switch (errorCode) {
|
|
1806
1822
|
case "AccessDeniedException":
|
|
1807
1823
|
case "com.amazonaws.greengrassv2#AccessDeniedException":
|
|
@@ -1820,10 +1836,12 @@ const deserializeAws_restJson1ListClientDevicesAssociatedWithCoreDeviceCommandEr
|
|
|
1820
1836
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1821
1837
|
default:
|
|
1822
1838
|
const parsedBody = parsedOutput.body;
|
|
1839
|
+
const $metadata = deserializeMetadata(output);
|
|
1840
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1823
1841
|
response = new GreengrassV2ServiceException_1.GreengrassV2ServiceException({
|
|
1824
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1842
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1825
1843
|
$fault: "client",
|
|
1826
|
-
$metadata
|
|
1844
|
+
$metadata,
|
|
1827
1845
|
});
|
|
1828
1846
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1829
1847
|
}
|
|
@@ -1853,8 +1871,7 @@ const deserializeAws_restJson1ListComponentsCommandError = async (output, contex
|
|
|
1853
1871
|
body: await parseBody(output.body, context),
|
|
1854
1872
|
};
|
|
1855
1873
|
let response;
|
|
1856
|
-
|
|
1857
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1874
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1858
1875
|
switch (errorCode) {
|
|
1859
1876
|
case "AccessDeniedException":
|
|
1860
1877
|
case "com.amazonaws.greengrassv2#AccessDeniedException":
|
|
@@ -1873,10 +1890,12 @@ const deserializeAws_restJson1ListComponentsCommandError = async (output, contex
|
|
|
1873
1890
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1874
1891
|
default:
|
|
1875
1892
|
const parsedBody = parsedOutput.body;
|
|
1893
|
+
const $metadata = deserializeMetadata(output);
|
|
1894
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1876
1895
|
response = new GreengrassV2ServiceException_1.GreengrassV2ServiceException({
|
|
1877
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1896
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1878
1897
|
$fault: "client",
|
|
1879
|
-
$metadata
|
|
1898
|
+
$metadata,
|
|
1880
1899
|
});
|
|
1881
1900
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1882
1901
|
}
|
|
@@ -1906,8 +1925,7 @@ const deserializeAws_restJson1ListComponentVersionsCommandError = async (output,
|
|
|
1906
1925
|
body: await parseBody(output.body, context),
|
|
1907
1926
|
};
|
|
1908
1927
|
let response;
|
|
1909
|
-
|
|
1910
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1928
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1911
1929
|
switch (errorCode) {
|
|
1912
1930
|
case "AccessDeniedException":
|
|
1913
1931
|
case "com.amazonaws.greengrassv2#AccessDeniedException":
|
|
@@ -1926,10 +1944,12 @@ const deserializeAws_restJson1ListComponentVersionsCommandError = async (output,
|
|
|
1926
1944
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1927
1945
|
default:
|
|
1928
1946
|
const parsedBody = parsedOutput.body;
|
|
1947
|
+
const $metadata = deserializeMetadata(output);
|
|
1948
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1929
1949
|
response = new GreengrassV2ServiceException_1.GreengrassV2ServiceException({
|
|
1930
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1950
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1931
1951
|
$fault: "client",
|
|
1932
|
-
$metadata
|
|
1952
|
+
$metadata,
|
|
1933
1953
|
});
|
|
1934
1954
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1935
1955
|
}
|
|
@@ -1959,8 +1979,7 @@ const deserializeAws_restJson1ListCoreDevicesCommandError = async (output, conte
|
|
|
1959
1979
|
body: await parseBody(output.body, context),
|
|
1960
1980
|
};
|
|
1961
1981
|
let response;
|
|
1962
|
-
|
|
1963
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1982
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1964
1983
|
switch (errorCode) {
|
|
1965
1984
|
case "AccessDeniedException":
|
|
1966
1985
|
case "com.amazonaws.greengrassv2#AccessDeniedException":
|
|
@@ -1976,10 +1995,12 @@ const deserializeAws_restJson1ListCoreDevicesCommandError = async (output, conte
|
|
|
1976
1995
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1977
1996
|
default:
|
|
1978
1997
|
const parsedBody = parsedOutput.body;
|
|
1998
|
+
const $metadata = deserializeMetadata(output);
|
|
1999
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1979
2000
|
response = new GreengrassV2ServiceException_1.GreengrassV2ServiceException({
|
|
1980
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2001
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1981
2002
|
$fault: "client",
|
|
1982
|
-
$metadata
|
|
2003
|
+
$metadata,
|
|
1983
2004
|
});
|
|
1984
2005
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1985
2006
|
}
|
|
@@ -2009,8 +2030,7 @@ const deserializeAws_restJson1ListDeploymentsCommandError = async (output, conte
|
|
|
2009
2030
|
body: await parseBody(output.body, context),
|
|
2010
2031
|
};
|
|
2011
2032
|
let response;
|
|
2012
|
-
|
|
2013
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2033
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2014
2034
|
switch (errorCode) {
|
|
2015
2035
|
case "AccessDeniedException":
|
|
2016
2036
|
case "com.amazonaws.greengrassv2#AccessDeniedException":
|
|
@@ -2026,10 +2046,12 @@ const deserializeAws_restJson1ListDeploymentsCommandError = async (output, conte
|
|
|
2026
2046
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2027
2047
|
default:
|
|
2028
2048
|
const parsedBody = parsedOutput.body;
|
|
2049
|
+
const $metadata = deserializeMetadata(output);
|
|
2050
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2029
2051
|
response = new GreengrassV2ServiceException_1.GreengrassV2ServiceException({
|
|
2030
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2052
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2031
2053
|
$fault: "client",
|
|
2032
|
-
$metadata
|
|
2054
|
+
$metadata,
|
|
2033
2055
|
});
|
|
2034
2056
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2035
2057
|
}
|
|
@@ -2059,8 +2081,7 @@ const deserializeAws_restJson1ListEffectiveDeploymentsCommandError = async (outp
|
|
|
2059
2081
|
body: await parseBody(output.body, context),
|
|
2060
2082
|
};
|
|
2061
2083
|
let response;
|
|
2062
|
-
|
|
2063
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2084
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2064
2085
|
switch (errorCode) {
|
|
2065
2086
|
case "AccessDeniedException":
|
|
2066
2087
|
case "com.amazonaws.greengrassv2#AccessDeniedException":
|
|
@@ -2079,10 +2100,12 @@ const deserializeAws_restJson1ListEffectiveDeploymentsCommandError = async (outp
|
|
|
2079
2100
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2080
2101
|
default:
|
|
2081
2102
|
const parsedBody = parsedOutput.body;
|
|
2103
|
+
const $metadata = deserializeMetadata(output);
|
|
2104
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2082
2105
|
response = new GreengrassV2ServiceException_1.GreengrassV2ServiceException({
|
|
2083
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2106
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2084
2107
|
$fault: "client",
|
|
2085
|
-
$metadata
|
|
2108
|
+
$metadata,
|
|
2086
2109
|
});
|
|
2087
2110
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2088
2111
|
}
|
|
@@ -2112,8 +2135,7 @@ const deserializeAws_restJson1ListInstalledComponentsCommandError = async (outpu
|
|
|
2112
2135
|
body: await parseBody(output.body, context),
|
|
2113
2136
|
};
|
|
2114
2137
|
let response;
|
|
2115
|
-
|
|
2116
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2138
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2117
2139
|
switch (errorCode) {
|
|
2118
2140
|
case "AccessDeniedException":
|
|
2119
2141
|
case "com.amazonaws.greengrassv2#AccessDeniedException":
|
|
@@ -2132,10 +2154,12 @@ const deserializeAws_restJson1ListInstalledComponentsCommandError = async (outpu
|
|
|
2132
2154
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2133
2155
|
default:
|
|
2134
2156
|
const parsedBody = parsedOutput.body;
|
|
2157
|
+
const $metadata = deserializeMetadata(output);
|
|
2158
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2135
2159
|
response = new GreengrassV2ServiceException_1.GreengrassV2ServiceException({
|
|
2136
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2160
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2137
2161
|
$fault: "client",
|
|
2138
|
-
$metadata
|
|
2162
|
+
$metadata,
|
|
2139
2163
|
});
|
|
2140
2164
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2141
2165
|
}
|
|
@@ -2161,8 +2185,7 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
2161
2185
|
body: await parseBody(output.body, context),
|
|
2162
2186
|
};
|
|
2163
2187
|
let response;
|
|
2164
|
-
|
|
2165
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2188
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2166
2189
|
switch (errorCode) {
|
|
2167
2190
|
case "InternalServerException":
|
|
2168
2191
|
case "com.amazonaws.greengrassv2#InternalServerException":
|
|
@@ -2175,10 +2198,12 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
2175
2198
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2176
2199
|
default:
|
|
2177
2200
|
const parsedBody = parsedOutput.body;
|
|
2201
|
+
const $metadata = deserializeMetadata(output);
|
|
2202
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2178
2203
|
response = new GreengrassV2ServiceException_1.GreengrassV2ServiceException({
|
|
2179
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2204
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2180
2205
|
$fault: "client",
|
|
2181
|
-
$metadata
|
|
2206
|
+
$metadata,
|
|
2182
2207
|
});
|
|
2183
2208
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2184
2209
|
}
|
|
@@ -2204,8 +2229,7 @@ const deserializeAws_restJson1ResolveComponentCandidatesCommandError = async (ou
|
|
|
2204
2229
|
body: await parseBody(output.body, context),
|
|
2205
2230
|
};
|
|
2206
2231
|
let response;
|
|
2207
|
-
|
|
2208
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2232
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2209
2233
|
switch (errorCode) {
|
|
2210
2234
|
case "AccessDeniedException":
|
|
2211
2235
|
case "com.amazonaws.greengrassv2#AccessDeniedException":
|
|
@@ -2227,10 +2251,12 @@ const deserializeAws_restJson1ResolveComponentCandidatesCommandError = async (ou
|
|
|
2227
2251
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2228
2252
|
default:
|
|
2229
2253
|
const parsedBody = parsedOutput.body;
|
|
2254
|
+
const $metadata = deserializeMetadata(output);
|
|
2255
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2230
2256
|
response = new GreengrassV2ServiceException_1.GreengrassV2ServiceException({
|
|
2231
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2257
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2232
2258
|
$fault: "client",
|
|
2233
|
-
$metadata
|
|
2259
|
+
$metadata,
|
|
2234
2260
|
});
|
|
2235
2261
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2236
2262
|
}
|
|
@@ -2252,8 +2278,7 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
2252
2278
|
body: await parseBody(output.body, context),
|
|
2253
2279
|
};
|
|
2254
2280
|
let response;
|
|
2255
|
-
|
|
2256
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2281
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2257
2282
|
switch (errorCode) {
|
|
2258
2283
|
case "InternalServerException":
|
|
2259
2284
|
case "com.amazonaws.greengrassv2#InternalServerException":
|
|
@@ -2266,10 +2291,12 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
2266
2291
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2267
2292
|
default:
|
|
2268
2293
|
const parsedBody = parsedOutput.body;
|
|
2294
|
+
const $metadata = deserializeMetadata(output);
|
|
2295
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2269
2296
|
response = new GreengrassV2ServiceException_1.GreengrassV2ServiceException({
|
|
2270
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2297
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2271
2298
|
$fault: "client",
|
|
2272
|
-
$metadata
|
|
2299
|
+
$metadata,
|
|
2273
2300
|
});
|
|
2274
2301
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2275
2302
|
}
|
|
@@ -2291,8 +2318,7 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
2291
2318
|
body: await parseBody(output.body, context),
|
|
2292
2319
|
};
|
|
2293
2320
|
let response;
|
|
2294
|
-
|
|
2295
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2321
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2296
2322
|
switch (errorCode) {
|
|
2297
2323
|
case "InternalServerException":
|
|
2298
2324
|
case "com.amazonaws.greengrassv2#InternalServerException":
|
|
@@ -2305,10 +2331,12 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
2305
2331
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2306
2332
|
default:
|
|
2307
2333
|
const parsedBody = parsedOutput.body;
|
|
2334
|
+
const $metadata = deserializeMetadata(output);
|
|
2335
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2308
2336
|
response = new GreengrassV2ServiceException_1.GreengrassV2ServiceException({
|
|
2309
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2337
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2310
2338
|
$fault: "client",
|
|
2311
|
-
$metadata
|
|
2339
|
+
$metadata,
|
|
2312
2340
|
});
|
|
2313
2341
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2314
2342
|
}
|
|
@@ -2338,8 +2366,7 @@ const deserializeAws_restJson1UpdateConnectivityInfoCommandError = async (output
|
|
|
2338
2366
|
body: await parseBody(output.body, context),
|
|
2339
2367
|
};
|
|
2340
2368
|
let response;
|
|
2341
|
-
|
|
2342
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2369
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2343
2370
|
switch (errorCode) {
|
|
2344
2371
|
case "InternalServerException":
|
|
2345
2372
|
case "com.amazonaws.greengrassv2#InternalServerException":
|
|
@@ -2349,10 +2376,12 @@ const deserializeAws_restJson1UpdateConnectivityInfoCommandError = async (output
|
|
|
2349
2376
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2350
2377
|
default:
|
|
2351
2378
|
const parsedBody = parsedOutput.body;
|
|
2379
|
+
const $metadata = deserializeMetadata(output);
|
|
2380
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2352
2381
|
response = new GreengrassV2ServiceException_1.GreengrassV2ServiceException({
|
|
2353
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2382
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2354
2383
|
$fault: "client",
|
|
2355
|
-
$metadata
|
|
2384
|
+
$metadata,
|
|
2356
2385
|
});
|
|
2357
2386
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2358
2387
|
}
|
|
@@ -3455,5 +3484,4 @@ const loadRestJsonErrorCode = (output, data) => {
|
|
|
3455
3484
|
if (data["__type"] !== undefined) {
|
|
3456
3485
|
return sanitizeErrorCode(data["__type"]);
|
|
3457
3486
|
}
|
|
3458
|
-
return "";
|
|
3459
3487
|
};
|