@aws-sdk/client-accessanalyzer 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 +140 -113
- package/dist-es/protocols/Aws_restJson1.js +140 -113
- package/package.json +6 -6
|
@@ -842,8 +842,7 @@ const deserializeAws_restJson1ApplyArchiveRuleCommandError = async (output, cont
|
|
|
842
842
|
body: await parseBody(output.body, context),
|
|
843
843
|
};
|
|
844
844
|
let response;
|
|
845
|
-
|
|
846
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
845
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
847
846
|
switch (errorCode) {
|
|
848
847
|
case "AccessDeniedException":
|
|
849
848
|
case "com.amazonaws.accessanalyzer#AccessDeniedException":
|
|
@@ -862,10 +861,12 @@ const deserializeAws_restJson1ApplyArchiveRuleCommandError = async (output, cont
|
|
|
862
861
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
863
862
|
default:
|
|
864
863
|
const parsedBody = parsedOutput.body;
|
|
864
|
+
const $metadata = deserializeMetadata(output);
|
|
865
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
865
866
|
response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
|
|
866
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
867
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
867
868
|
$fault: "client",
|
|
868
|
-
$metadata
|
|
869
|
+
$metadata,
|
|
869
870
|
});
|
|
870
871
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
871
872
|
}
|
|
@@ -887,8 +888,7 @@ const deserializeAws_restJson1CancelPolicyGenerationCommandError = async (output
|
|
|
887
888
|
body: await parseBody(output.body, context),
|
|
888
889
|
};
|
|
889
890
|
let response;
|
|
890
|
-
|
|
891
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
891
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
892
892
|
switch (errorCode) {
|
|
893
893
|
case "AccessDeniedException":
|
|
894
894
|
case "com.amazonaws.accessanalyzer#AccessDeniedException":
|
|
@@ -904,10 +904,12 @@ const deserializeAws_restJson1CancelPolicyGenerationCommandError = async (output
|
|
|
904
904
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
905
905
|
default:
|
|
906
906
|
const parsedBody = parsedOutput.body;
|
|
907
|
+
const $metadata = deserializeMetadata(output);
|
|
908
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
907
909
|
response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
|
|
908
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
910
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
909
911
|
$fault: "client",
|
|
910
|
-
$metadata
|
|
912
|
+
$metadata,
|
|
911
913
|
});
|
|
912
914
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
913
915
|
}
|
|
@@ -933,8 +935,7 @@ const deserializeAws_restJson1CreateAccessPreviewCommandError = async (output, c
|
|
|
933
935
|
body: await parseBody(output.body, context),
|
|
934
936
|
};
|
|
935
937
|
let response;
|
|
936
|
-
|
|
937
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
938
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
938
939
|
switch (errorCode) {
|
|
939
940
|
case "AccessDeniedException":
|
|
940
941
|
case "com.amazonaws.accessanalyzer#AccessDeniedException":
|
|
@@ -959,10 +960,12 @@ const deserializeAws_restJson1CreateAccessPreviewCommandError = async (output, c
|
|
|
959
960
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
960
961
|
default:
|
|
961
962
|
const parsedBody = parsedOutput.body;
|
|
963
|
+
const $metadata = deserializeMetadata(output);
|
|
964
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
962
965
|
response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
|
|
963
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
966
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
964
967
|
$fault: "client",
|
|
965
|
-
$metadata
|
|
968
|
+
$metadata,
|
|
966
969
|
});
|
|
967
970
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
968
971
|
}
|
|
@@ -988,8 +991,7 @@ const deserializeAws_restJson1CreateAnalyzerCommandError = async (output, contex
|
|
|
988
991
|
body: await parseBody(output.body, context),
|
|
989
992
|
};
|
|
990
993
|
let response;
|
|
991
|
-
|
|
992
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
994
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
993
995
|
switch (errorCode) {
|
|
994
996
|
case "AccessDeniedException":
|
|
995
997
|
case "com.amazonaws.accessanalyzer#AccessDeniedException":
|
|
@@ -1011,10 +1013,12 @@ const deserializeAws_restJson1CreateAnalyzerCommandError = async (output, contex
|
|
|
1011
1013
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1012
1014
|
default:
|
|
1013
1015
|
const parsedBody = parsedOutput.body;
|
|
1016
|
+
const $metadata = deserializeMetadata(output);
|
|
1017
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1014
1018
|
response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
|
|
1015
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1019
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1016
1020
|
$fault: "client",
|
|
1017
|
-
$metadata
|
|
1021
|
+
$metadata,
|
|
1018
1022
|
});
|
|
1019
1023
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1020
1024
|
}
|
|
@@ -1036,8 +1040,7 @@ const deserializeAws_restJson1CreateArchiveRuleCommandError = async (output, con
|
|
|
1036
1040
|
body: await parseBody(output.body, context),
|
|
1037
1041
|
};
|
|
1038
1042
|
let response;
|
|
1039
|
-
|
|
1040
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1043
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1041
1044
|
switch (errorCode) {
|
|
1042
1045
|
case "AccessDeniedException":
|
|
1043
1046
|
case "com.amazonaws.accessanalyzer#AccessDeniedException":
|
|
@@ -1062,10 +1065,12 @@ const deserializeAws_restJson1CreateArchiveRuleCommandError = async (output, con
|
|
|
1062
1065
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1063
1066
|
default:
|
|
1064
1067
|
const parsedBody = parsedOutput.body;
|
|
1068
|
+
const $metadata = deserializeMetadata(output);
|
|
1069
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1065
1070
|
response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
|
|
1066
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1071
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1067
1072
|
$fault: "client",
|
|
1068
|
-
$metadata
|
|
1073
|
+
$metadata,
|
|
1069
1074
|
});
|
|
1070
1075
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1071
1076
|
}
|
|
@@ -1087,8 +1092,7 @@ const deserializeAws_restJson1DeleteAnalyzerCommandError = async (output, contex
|
|
|
1087
1092
|
body: await parseBody(output.body, context),
|
|
1088
1093
|
};
|
|
1089
1094
|
let response;
|
|
1090
|
-
|
|
1091
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1095
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1092
1096
|
switch (errorCode) {
|
|
1093
1097
|
case "AccessDeniedException":
|
|
1094
1098
|
case "com.amazonaws.accessanalyzer#AccessDeniedException":
|
|
@@ -1107,10 +1111,12 @@ const deserializeAws_restJson1DeleteAnalyzerCommandError = async (output, contex
|
|
|
1107
1111
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1108
1112
|
default:
|
|
1109
1113
|
const parsedBody = parsedOutput.body;
|
|
1114
|
+
const $metadata = deserializeMetadata(output);
|
|
1115
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1110
1116
|
response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
|
|
1111
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1117
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1112
1118
|
$fault: "client",
|
|
1113
|
-
$metadata
|
|
1119
|
+
$metadata,
|
|
1114
1120
|
});
|
|
1115
1121
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1116
1122
|
}
|
|
@@ -1132,8 +1138,7 @@ const deserializeAws_restJson1DeleteArchiveRuleCommandError = async (output, con
|
|
|
1132
1138
|
body: await parseBody(output.body, context),
|
|
1133
1139
|
};
|
|
1134
1140
|
let response;
|
|
1135
|
-
|
|
1136
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1141
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1137
1142
|
switch (errorCode) {
|
|
1138
1143
|
case "AccessDeniedException":
|
|
1139
1144
|
case "com.amazonaws.accessanalyzer#AccessDeniedException":
|
|
@@ -1152,10 +1157,12 @@ const deserializeAws_restJson1DeleteArchiveRuleCommandError = async (output, con
|
|
|
1152
1157
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1153
1158
|
default:
|
|
1154
1159
|
const parsedBody = parsedOutput.body;
|
|
1160
|
+
const $metadata = deserializeMetadata(output);
|
|
1161
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1155
1162
|
response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
|
|
1156
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1163
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1157
1164
|
$fault: "client",
|
|
1158
|
-
$metadata
|
|
1165
|
+
$metadata,
|
|
1159
1166
|
});
|
|
1160
1167
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1161
1168
|
}
|
|
@@ -1181,8 +1188,7 @@ const deserializeAws_restJson1GetAccessPreviewCommandError = async (output, cont
|
|
|
1181
1188
|
body: await parseBody(output.body, context),
|
|
1182
1189
|
};
|
|
1183
1190
|
let response;
|
|
1184
|
-
|
|
1185
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1191
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1186
1192
|
switch (errorCode) {
|
|
1187
1193
|
case "AccessDeniedException":
|
|
1188
1194
|
case "com.amazonaws.accessanalyzer#AccessDeniedException":
|
|
@@ -1201,10 +1207,12 @@ const deserializeAws_restJson1GetAccessPreviewCommandError = async (output, cont
|
|
|
1201
1207
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1202
1208
|
default:
|
|
1203
1209
|
const parsedBody = parsedOutput.body;
|
|
1210
|
+
const $metadata = deserializeMetadata(output);
|
|
1211
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1204
1212
|
response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
|
|
1205
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1213
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1206
1214
|
$fault: "client",
|
|
1207
|
-
$metadata
|
|
1215
|
+
$metadata,
|
|
1208
1216
|
});
|
|
1209
1217
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1210
1218
|
}
|
|
@@ -1230,8 +1238,7 @@ const deserializeAws_restJson1GetAnalyzedResourceCommandError = async (output, c
|
|
|
1230
1238
|
body: await parseBody(output.body, context),
|
|
1231
1239
|
};
|
|
1232
1240
|
let response;
|
|
1233
|
-
|
|
1234
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1241
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1235
1242
|
switch (errorCode) {
|
|
1236
1243
|
case "AccessDeniedException":
|
|
1237
1244
|
case "com.amazonaws.accessanalyzer#AccessDeniedException":
|
|
@@ -1250,10 +1257,12 @@ const deserializeAws_restJson1GetAnalyzedResourceCommandError = async (output, c
|
|
|
1250
1257
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1251
1258
|
default:
|
|
1252
1259
|
const parsedBody = parsedOutput.body;
|
|
1260
|
+
const $metadata = deserializeMetadata(output);
|
|
1261
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1253
1262
|
response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
|
|
1254
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1263
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1255
1264
|
$fault: "client",
|
|
1256
|
-
$metadata
|
|
1265
|
+
$metadata,
|
|
1257
1266
|
});
|
|
1258
1267
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1259
1268
|
}
|
|
@@ -1279,8 +1288,7 @@ const deserializeAws_restJson1GetAnalyzerCommandError = async (output, context)
|
|
|
1279
1288
|
body: await parseBody(output.body, context),
|
|
1280
1289
|
};
|
|
1281
1290
|
let response;
|
|
1282
|
-
|
|
1283
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1291
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1284
1292
|
switch (errorCode) {
|
|
1285
1293
|
case "AccessDeniedException":
|
|
1286
1294
|
case "com.amazonaws.accessanalyzer#AccessDeniedException":
|
|
@@ -1299,10 +1307,12 @@ const deserializeAws_restJson1GetAnalyzerCommandError = async (output, context)
|
|
|
1299
1307
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1300
1308
|
default:
|
|
1301
1309
|
const parsedBody = parsedOutput.body;
|
|
1310
|
+
const $metadata = deserializeMetadata(output);
|
|
1311
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1302
1312
|
response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
|
|
1303
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1313
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1304
1314
|
$fault: "client",
|
|
1305
|
-
$metadata
|
|
1315
|
+
$metadata,
|
|
1306
1316
|
});
|
|
1307
1317
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1308
1318
|
}
|
|
@@ -1328,8 +1338,7 @@ const deserializeAws_restJson1GetArchiveRuleCommandError = async (output, contex
|
|
|
1328
1338
|
body: await parseBody(output.body, context),
|
|
1329
1339
|
};
|
|
1330
1340
|
let response;
|
|
1331
|
-
|
|
1332
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1341
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1333
1342
|
switch (errorCode) {
|
|
1334
1343
|
case "AccessDeniedException":
|
|
1335
1344
|
case "com.amazonaws.accessanalyzer#AccessDeniedException":
|
|
@@ -1348,10 +1357,12 @@ const deserializeAws_restJson1GetArchiveRuleCommandError = async (output, contex
|
|
|
1348
1357
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1349
1358
|
default:
|
|
1350
1359
|
const parsedBody = parsedOutput.body;
|
|
1360
|
+
const $metadata = deserializeMetadata(output);
|
|
1361
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1351
1362
|
response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
|
|
1352
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1363
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1353
1364
|
$fault: "client",
|
|
1354
|
-
$metadata
|
|
1365
|
+
$metadata,
|
|
1355
1366
|
});
|
|
1356
1367
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1357
1368
|
}
|
|
@@ -1377,8 +1388,7 @@ const deserializeAws_restJson1GetFindingCommandError = async (output, context) =
|
|
|
1377
1388
|
body: await parseBody(output.body, context),
|
|
1378
1389
|
};
|
|
1379
1390
|
let response;
|
|
1380
|
-
|
|
1381
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1391
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1382
1392
|
switch (errorCode) {
|
|
1383
1393
|
case "AccessDeniedException":
|
|
1384
1394
|
case "com.amazonaws.accessanalyzer#AccessDeniedException":
|
|
@@ -1397,10 +1407,12 @@ const deserializeAws_restJson1GetFindingCommandError = async (output, context) =
|
|
|
1397
1407
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1398
1408
|
default:
|
|
1399
1409
|
const parsedBody = parsedOutput.body;
|
|
1410
|
+
const $metadata = deserializeMetadata(output);
|
|
1411
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1400
1412
|
response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
|
|
1401
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1413
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1402
1414
|
$fault: "client",
|
|
1403
|
-
$metadata
|
|
1415
|
+
$metadata,
|
|
1404
1416
|
});
|
|
1405
1417
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1406
1418
|
}
|
|
@@ -1430,8 +1442,7 @@ const deserializeAws_restJson1GetGeneratedPolicyCommandError = async (output, co
|
|
|
1430
1442
|
body: await parseBody(output.body, context),
|
|
1431
1443
|
};
|
|
1432
1444
|
let response;
|
|
1433
|
-
|
|
1434
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1445
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1435
1446
|
switch (errorCode) {
|
|
1436
1447
|
case "AccessDeniedException":
|
|
1437
1448
|
case "com.amazonaws.accessanalyzer#AccessDeniedException":
|
|
@@ -1447,10 +1458,12 @@ const deserializeAws_restJson1GetGeneratedPolicyCommandError = async (output, co
|
|
|
1447
1458
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1448
1459
|
default:
|
|
1449
1460
|
const parsedBody = parsedOutput.body;
|
|
1461
|
+
const $metadata = deserializeMetadata(output);
|
|
1462
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1450
1463
|
response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
|
|
1451
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1464
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1452
1465
|
$fault: "client",
|
|
1453
|
-
$metadata
|
|
1466
|
+
$metadata,
|
|
1454
1467
|
});
|
|
1455
1468
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1456
1469
|
}
|
|
@@ -1480,8 +1493,7 @@ const deserializeAws_restJson1ListAccessPreviewFindingsCommandError = async (out
|
|
|
1480
1493
|
body: await parseBody(output.body, context),
|
|
1481
1494
|
};
|
|
1482
1495
|
let response;
|
|
1483
|
-
|
|
1484
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1496
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1485
1497
|
switch (errorCode) {
|
|
1486
1498
|
case "AccessDeniedException":
|
|
1487
1499
|
case "com.amazonaws.accessanalyzer#AccessDeniedException":
|
|
@@ -1503,10 +1515,12 @@ const deserializeAws_restJson1ListAccessPreviewFindingsCommandError = async (out
|
|
|
1503
1515
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1504
1516
|
default:
|
|
1505
1517
|
const parsedBody = parsedOutput.body;
|
|
1518
|
+
const $metadata = deserializeMetadata(output);
|
|
1519
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1506
1520
|
response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
|
|
1507
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1521
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1508
1522
|
$fault: "client",
|
|
1509
|
-
$metadata
|
|
1523
|
+
$metadata,
|
|
1510
1524
|
});
|
|
1511
1525
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1512
1526
|
}
|
|
@@ -1536,8 +1550,7 @@ const deserializeAws_restJson1ListAccessPreviewsCommandError = async (output, co
|
|
|
1536
1550
|
body: await parseBody(output.body, context),
|
|
1537
1551
|
};
|
|
1538
1552
|
let response;
|
|
1539
|
-
|
|
1540
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1553
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1541
1554
|
switch (errorCode) {
|
|
1542
1555
|
case "AccessDeniedException":
|
|
1543
1556
|
case "com.amazonaws.accessanalyzer#AccessDeniedException":
|
|
@@ -1556,10 +1569,12 @@ const deserializeAws_restJson1ListAccessPreviewsCommandError = async (output, co
|
|
|
1556
1569
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1557
1570
|
default:
|
|
1558
1571
|
const parsedBody = parsedOutput.body;
|
|
1572
|
+
const $metadata = deserializeMetadata(output);
|
|
1573
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1559
1574
|
response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
|
|
1560
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1575
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1561
1576
|
$fault: "client",
|
|
1562
|
-
$metadata
|
|
1577
|
+
$metadata,
|
|
1563
1578
|
});
|
|
1564
1579
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1565
1580
|
}
|
|
@@ -1589,8 +1604,7 @@ const deserializeAws_restJson1ListAnalyzedResourcesCommandError = async (output,
|
|
|
1589
1604
|
body: await parseBody(output.body, context),
|
|
1590
1605
|
};
|
|
1591
1606
|
let response;
|
|
1592
|
-
|
|
1593
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1607
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1594
1608
|
switch (errorCode) {
|
|
1595
1609
|
case "AccessDeniedException":
|
|
1596
1610
|
case "com.amazonaws.accessanalyzer#AccessDeniedException":
|
|
@@ -1609,10 +1623,12 @@ const deserializeAws_restJson1ListAnalyzedResourcesCommandError = async (output,
|
|
|
1609
1623
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1610
1624
|
default:
|
|
1611
1625
|
const parsedBody = parsedOutput.body;
|
|
1626
|
+
const $metadata = deserializeMetadata(output);
|
|
1627
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1612
1628
|
response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
|
|
1613
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1629
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1614
1630
|
$fault: "client",
|
|
1615
|
-
$metadata
|
|
1631
|
+
$metadata,
|
|
1616
1632
|
});
|
|
1617
1633
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1618
1634
|
}
|
|
@@ -1642,8 +1658,7 @@ const deserializeAws_restJson1ListAnalyzersCommandError = async (output, context
|
|
|
1642
1658
|
body: await parseBody(output.body, context),
|
|
1643
1659
|
};
|
|
1644
1660
|
let response;
|
|
1645
|
-
|
|
1646
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1661
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1647
1662
|
switch (errorCode) {
|
|
1648
1663
|
case "AccessDeniedException":
|
|
1649
1664
|
case "com.amazonaws.accessanalyzer#AccessDeniedException":
|
|
@@ -1659,10 +1674,12 @@ const deserializeAws_restJson1ListAnalyzersCommandError = async (output, context
|
|
|
1659
1674
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1660
1675
|
default:
|
|
1661
1676
|
const parsedBody = parsedOutput.body;
|
|
1677
|
+
const $metadata = deserializeMetadata(output);
|
|
1678
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1662
1679
|
response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
|
|
1663
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1680
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1664
1681
|
$fault: "client",
|
|
1665
|
-
$metadata
|
|
1682
|
+
$metadata,
|
|
1666
1683
|
});
|
|
1667
1684
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1668
1685
|
}
|
|
@@ -1692,8 +1709,7 @@ const deserializeAws_restJson1ListArchiveRulesCommandError = async (output, cont
|
|
|
1692
1709
|
body: await parseBody(output.body, context),
|
|
1693
1710
|
};
|
|
1694
1711
|
let response;
|
|
1695
|
-
|
|
1696
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1712
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1697
1713
|
switch (errorCode) {
|
|
1698
1714
|
case "AccessDeniedException":
|
|
1699
1715
|
case "com.amazonaws.accessanalyzer#AccessDeniedException":
|
|
@@ -1709,10 +1725,12 @@ const deserializeAws_restJson1ListArchiveRulesCommandError = async (output, cont
|
|
|
1709
1725
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1710
1726
|
default:
|
|
1711
1727
|
const parsedBody = parsedOutput.body;
|
|
1728
|
+
const $metadata = deserializeMetadata(output);
|
|
1729
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1712
1730
|
response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
|
|
1713
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1731
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1714
1732
|
$fault: "client",
|
|
1715
|
-
$metadata
|
|
1733
|
+
$metadata,
|
|
1716
1734
|
});
|
|
1717
1735
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1718
1736
|
}
|
|
@@ -1742,8 +1760,7 @@ const deserializeAws_restJson1ListFindingsCommandError = async (output, context)
|
|
|
1742
1760
|
body: await parseBody(output.body, context),
|
|
1743
1761
|
};
|
|
1744
1762
|
let response;
|
|
1745
|
-
|
|
1746
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1763
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1747
1764
|
switch (errorCode) {
|
|
1748
1765
|
case "AccessDeniedException":
|
|
1749
1766
|
case "com.amazonaws.accessanalyzer#AccessDeniedException":
|
|
@@ -1762,10 +1779,12 @@ const deserializeAws_restJson1ListFindingsCommandError = async (output, context)
|
|
|
1762
1779
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1763
1780
|
default:
|
|
1764
1781
|
const parsedBody = parsedOutput.body;
|
|
1782
|
+
const $metadata = deserializeMetadata(output);
|
|
1783
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1765
1784
|
response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
|
|
1766
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1785
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1767
1786
|
$fault: "client",
|
|
1768
|
-
$metadata
|
|
1787
|
+
$metadata,
|
|
1769
1788
|
});
|
|
1770
1789
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1771
1790
|
}
|
|
@@ -1795,8 +1814,7 @@ const deserializeAws_restJson1ListPolicyGenerationsCommandError = async (output,
|
|
|
1795
1814
|
body: await parseBody(output.body, context),
|
|
1796
1815
|
};
|
|
1797
1816
|
let response;
|
|
1798
|
-
|
|
1799
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1817
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1800
1818
|
switch (errorCode) {
|
|
1801
1819
|
case "AccessDeniedException":
|
|
1802
1820
|
case "com.amazonaws.accessanalyzer#AccessDeniedException":
|
|
@@ -1812,10 +1830,12 @@ const deserializeAws_restJson1ListPolicyGenerationsCommandError = async (output,
|
|
|
1812
1830
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1813
1831
|
default:
|
|
1814
1832
|
const parsedBody = parsedOutput.body;
|
|
1833
|
+
const $metadata = deserializeMetadata(output);
|
|
1834
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1815
1835
|
response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
|
|
1816
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1836
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1817
1837
|
$fault: "client",
|
|
1818
|
-
$metadata
|
|
1838
|
+
$metadata,
|
|
1819
1839
|
});
|
|
1820
1840
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1821
1841
|
}
|
|
@@ -1841,8 +1861,7 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
1841
1861
|
body: await parseBody(output.body, context),
|
|
1842
1862
|
};
|
|
1843
1863
|
let response;
|
|
1844
|
-
|
|
1845
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1864
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1846
1865
|
switch (errorCode) {
|
|
1847
1866
|
case "AccessDeniedException":
|
|
1848
1867
|
case "com.amazonaws.accessanalyzer#AccessDeniedException":
|
|
@@ -1861,10 +1880,12 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
1861
1880
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1862
1881
|
default:
|
|
1863
1882
|
const parsedBody = parsedOutput.body;
|
|
1883
|
+
const $metadata = deserializeMetadata(output);
|
|
1884
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1864
1885
|
response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
|
|
1865
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1886
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1866
1887
|
$fault: "client",
|
|
1867
|
-
$metadata
|
|
1888
|
+
$metadata,
|
|
1868
1889
|
});
|
|
1869
1890
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1870
1891
|
}
|
|
@@ -1890,8 +1911,7 @@ const deserializeAws_restJson1StartPolicyGenerationCommandError = async (output,
|
|
|
1890
1911
|
body: await parseBody(output.body, context),
|
|
1891
1912
|
};
|
|
1892
1913
|
let response;
|
|
1893
|
-
|
|
1894
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1914
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1895
1915
|
switch (errorCode) {
|
|
1896
1916
|
case "AccessDeniedException":
|
|
1897
1917
|
case "com.amazonaws.accessanalyzer#AccessDeniedException":
|
|
@@ -1913,10 +1933,12 @@ const deserializeAws_restJson1StartPolicyGenerationCommandError = async (output,
|
|
|
1913
1933
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1914
1934
|
default:
|
|
1915
1935
|
const parsedBody = parsedOutput.body;
|
|
1936
|
+
const $metadata = deserializeMetadata(output);
|
|
1937
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1916
1938
|
response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
|
|
1917
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1939
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1918
1940
|
$fault: "client",
|
|
1919
|
-
$metadata
|
|
1941
|
+
$metadata,
|
|
1920
1942
|
});
|
|
1921
1943
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1922
1944
|
}
|
|
@@ -1938,8 +1960,7 @@ const deserializeAws_restJson1StartResourceScanCommandError = async (output, con
|
|
|
1938
1960
|
body: await parseBody(output.body, context),
|
|
1939
1961
|
};
|
|
1940
1962
|
let response;
|
|
1941
|
-
|
|
1942
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1963
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1943
1964
|
switch (errorCode) {
|
|
1944
1965
|
case "AccessDeniedException":
|
|
1945
1966
|
case "com.amazonaws.accessanalyzer#AccessDeniedException":
|
|
@@ -1958,10 +1979,12 @@ const deserializeAws_restJson1StartResourceScanCommandError = async (output, con
|
|
|
1958
1979
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1959
1980
|
default:
|
|
1960
1981
|
const parsedBody = parsedOutput.body;
|
|
1982
|
+
const $metadata = deserializeMetadata(output);
|
|
1983
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1961
1984
|
response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
|
|
1962
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1985
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1963
1986
|
$fault: "client",
|
|
1964
|
-
$metadata
|
|
1987
|
+
$metadata,
|
|
1965
1988
|
});
|
|
1966
1989
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1967
1990
|
}
|
|
@@ -1983,8 +2006,7 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
1983
2006
|
body: await parseBody(output.body, context),
|
|
1984
2007
|
};
|
|
1985
2008
|
let response;
|
|
1986
|
-
|
|
1987
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2009
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1988
2010
|
switch (errorCode) {
|
|
1989
2011
|
case "AccessDeniedException":
|
|
1990
2012
|
case "com.amazonaws.accessanalyzer#AccessDeniedException":
|
|
@@ -2003,10 +2025,12 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
2003
2025
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2004
2026
|
default:
|
|
2005
2027
|
const parsedBody = parsedOutput.body;
|
|
2028
|
+
const $metadata = deserializeMetadata(output);
|
|
2029
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2006
2030
|
response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
|
|
2007
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2031
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2008
2032
|
$fault: "client",
|
|
2009
|
-
$metadata
|
|
2033
|
+
$metadata,
|
|
2010
2034
|
});
|
|
2011
2035
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2012
2036
|
}
|
|
@@ -2028,8 +2052,7 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
2028
2052
|
body: await parseBody(output.body, context),
|
|
2029
2053
|
};
|
|
2030
2054
|
let response;
|
|
2031
|
-
|
|
2032
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2055
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2033
2056
|
switch (errorCode) {
|
|
2034
2057
|
case "AccessDeniedException":
|
|
2035
2058
|
case "com.amazonaws.accessanalyzer#AccessDeniedException":
|
|
@@ -2048,10 +2071,12 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
2048
2071
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2049
2072
|
default:
|
|
2050
2073
|
const parsedBody = parsedOutput.body;
|
|
2074
|
+
const $metadata = deserializeMetadata(output);
|
|
2075
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2051
2076
|
response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
|
|
2052
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2077
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2053
2078
|
$fault: "client",
|
|
2054
|
-
$metadata
|
|
2079
|
+
$metadata,
|
|
2055
2080
|
});
|
|
2056
2081
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2057
2082
|
}
|
|
@@ -2073,8 +2098,7 @@ const deserializeAws_restJson1UpdateArchiveRuleCommandError = async (output, con
|
|
|
2073
2098
|
body: await parseBody(output.body, context),
|
|
2074
2099
|
};
|
|
2075
2100
|
let response;
|
|
2076
|
-
|
|
2077
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2101
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2078
2102
|
switch (errorCode) {
|
|
2079
2103
|
case "AccessDeniedException":
|
|
2080
2104
|
case "com.amazonaws.accessanalyzer#AccessDeniedException":
|
|
@@ -2093,10 +2117,12 @@ const deserializeAws_restJson1UpdateArchiveRuleCommandError = async (output, con
|
|
|
2093
2117
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2094
2118
|
default:
|
|
2095
2119
|
const parsedBody = parsedOutput.body;
|
|
2120
|
+
const $metadata = deserializeMetadata(output);
|
|
2121
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2096
2122
|
response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
|
|
2097
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2123
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2098
2124
|
$fault: "client",
|
|
2099
|
-
$metadata
|
|
2125
|
+
$metadata,
|
|
2100
2126
|
});
|
|
2101
2127
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2102
2128
|
}
|
|
@@ -2118,8 +2144,7 @@ const deserializeAws_restJson1UpdateFindingsCommandError = async (output, contex
|
|
|
2118
2144
|
body: await parseBody(output.body, context),
|
|
2119
2145
|
};
|
|
2120
2146
|
let response;
|
|
2121
|
-
|
|
2122
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2147
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2123
2148
|
switch (errorCode) {
|
|
2124
2149
|
case "AccessDeniedException":
|
|
2125
2150
|
case "com.amazonaws.accessanalyzer#AccessDeniedException":
|
|
@@ -2138,10 +2163,12 @@ const deserializeAws_restJson1UpdateFindingsCommandError = async (output, contex
|
|
|
2138
2163
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2139
2164
|
default:
|
|
2140
2165
|
const parsedBody = parsedOutput.body;
|
|
2166
|
+
const $metadata = deserializeMetadata(output);
|
|
2167
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2141
2168
|
response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
|
|
2142
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2169
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2143
2170
|
$fault: "client",
|
|
2144
|
-
$metadata
|
|
2171
|
+
$metadata,
|
|
2145
2172
|
});
|
|
2146
2173
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2147
2174
|
}
|
|
@@ -2171,8 +2198,7 @@ const deserializeAws_restJson1ValidatePolicyCommandError = async (output, contex
|
|
|
2171
2198
|
body: await parseBody(output.body, context),
|
|
2172
2199
|
};
|
|
2173
2200
|
let response;
|
|
2174
|
-
|
|
2175
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2201
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2176
2202
|
switch (errorCode) {
|
|
2177
2203
|
case "AccessDeniedException":
|
|
2178
2204
|
case "com.amazonaws.accessanalyzer#AccessDeniedException":
|
|
@@ -2188,10 +2214,12 @@ const deserializeAws_restJson1ValidatePolicyCommandError = async (output, contex
|
|
|
2188
2214
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2189
2215
|
default:
|
|
2190
2216
|
const parsedBody = parsedOutput.body;
|
|
2217
|
+
const $metadata = deserializeMetadata(output);
|
|
2218
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2191
2219
|
response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
|
|
2192
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2220
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2193
2221
|
$fault: "client",
|
|
2194
|
-
$metadata
|
|
2222
|
+
$metadata,
|
|
2195
2223
|
});
|
|
2196
2224
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2197
2225
|
}
|
|
@@ -3525,5 +3553,4 @@ const loadRestJsonErrorCode = (output, data) => {
|
|
|
3525
3553
|
if (data["__type"] !== undefined) {
|
|
3526
3554
|
return sanitizeErrorCode(data["__type"]);
|
|
3527
3555
|
}
|
|
3528
|
-
return "";
|
|
3529
3556
|
};
|