@aws-sdk/client-inspector2 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 +150 -121
- package/dist-es/protocols/Aws_restJson1.js +150 -121
- package/package.json +6 -6
|
@@ -760,8 +760,7 @@ const deserializeAws_restJson1AssociateMemberCommandError = async (output, conte
|
|
|
760
760
|
body: await parseBody(output.body, context),
|
|
761
761
|
};
|
|
762
762
|
let response;
|
|
763
|
-
|
|
764
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
763
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
765
764
|
switch (errorCode) {
|
|
766
765
|
case "AccessDeniedException":
|
|
767
766
|
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
@@ -777,10 +776,12 @@ const deserializeAws_restJson1AssociateMemberCommandError = async (output, conte
|
|
|
777
776
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
778
777
|
default:
|
|
779
778
|
const parsedBody = parsedOutput.body;
|
|
779
|
+
const $metadata = deserializeMetadata(output);
|
|
780
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
780
781
|
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
781
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
782
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
782
783
|
$fault: "client",
|
|
783
|
-
$metadata
|
|
784
|
+
$metadata,
|
|
784
785
|
});
|
|
785
786
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
786
787
|
}
|
|
@@ -810,8 +811,7 @@ const deserializeAws_restJson1BatchGetAccountStatusCommandError = async (output,
|
|
|
810
811
|
body: await parseBody(output.body, context),
|
|
811
812
|
};
|
|
812
813
|
let response;
|
|
813
|
-
|
|
814
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
814
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
815
815
|
switch (errorCode) {
|
|
816
816
|
case "AccessDeniedException":
|
|
817
817
|
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
@@ -830,10 +830,12 @@ const deserializeAws_restJson1BatchGetAccountStatusCommandError = async (output,
|
|
|
830
830
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
831
831
|
default:
|
|
832
832
|
const parsedBody = parsedOutput.body;
|
|
833
|
+
const $metadata = deserializeMetadata(output);
|
|
834
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
833
835
|
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
834
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
836
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
835
837
|
$fault: "client",
|
|
836
|
-
$metadata
|
|
838
|
+
$metadata,
|
|
837
839
|
});
|
|
838
840
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
839
841
|
}
|
|
@@ -863,8 +865,7 @@ const deserializeAws_restJson1BatchGetFreeTrialInfoCommandError = async (output,
|
|
|
863
865
|
body: await parseBody(output.body, context),
|
|
864
866
|
};
|
|
865
867
|
let response;
|
|
866
|
-
|
|
867
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
868
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
868
869
|
switch (errorCode) {
|
|
869
870
|
case "AccessDeniedException":
|
|
870
871
|
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
@@ -880,10 +881,12 @@ const deserializeAws_restJson1BatchGetFreeTrialInfoCommandError = async (output,
|
|
|
880
881
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
881
882
|
default:
|
|
882
883
|
const parsedBody = parsedOutput.body;
|
|
884
|
+
const $metadata = deserializeMetadata(output);
|
|
885
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
883
886
|
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
884
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
887
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
885
888
|
$fault: "client",
|
|
886
|
-
$metadata
|
|
889
|
+
$metadata,
|
|
887
890
|
});
|
|
888
891
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
889
892
|
}
|
|
@@ -909,8 +912,7 @@ const deserializeAws_restJson1CancelFindingsReportCommandError = async (output,
|
|
|
909
912
|
body: await parseBody(output.body, context),
|
|
910
913
|
};
|
|
911
914
|
let response;
|
|
912
|
-
|
|
913
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
915
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
914
916
|
switch (errorCode) {
|
|
915
917
|
case "AccessDeniedException":
|
|
916
918
|
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
@@ -929,10 +931,12 @@ const deserializeAws_restJson1CancelFindingsReportCommandError = async (output,
|
|
|
929
931
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
930
932
|
default:
|
|
931
933
|
const parsedBody = parsedOutput.body;
|
|
934
|
+
const $metadata = deserializeMetadata(output);
|
|
935
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
932
936
|
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
933
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
937
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
934
938
|
$fault: "client",
|
|
935
|
-
$metadata
|
|
939
|
+
$metadata,
|
|
936
940
|
});
|
|
937
941
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
938
942
|
}
|
|
@@ -958,8 +962,7 @@ const deserializeAws_restJson1CreateFilterCommandError = async (output, context)
|
|
|
958
962
|
body: await parseBody(output.body, context),
|
|
959
963
|
};
|
|
960
964
|
let response;
|
|
961
|
-
|
|
962
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
965
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
963
966
|
switch (errorCode) {
|
|
964
967
|
case "AccessDeniedException":
|
|
965
968
|
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
@@ -981,10 +984,12 @@ const deserializeAws_restJson1CreateFilterCommandError = async (output, context)
|
|
|
981
984
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
982
985
|
default:
|
|
983
986
|
const parsedBody = parsedOutput.body;
|
|
987
|
+
const $metadata = deserializeMetadata(output);
|
|
988
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
984
989
|
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
985
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
990
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
986
991
|
$fault: "client",
|
|
987
|
-
$metadata
|
|
992
|
+
$metadata,
|
|
988
993
|
});
|
|
989
994
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
990
995
|
}
|
|
@@ -1010,8 +1015,7 @@ const deserializeAws_restJson1CreateFindingsReportCommandError = async (output,
|
|
|
1010
1015
|
body: await parseBody(output.body, context),
|
|
1011
1016
|
};
|
|
1012
1017
|
let response;
|
|
1013
|
-
|
|
1014
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1018
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1015
1019
|
switch (errorCode) {
|
|
1016
1020
|
case "AccessDeniedException":
|
|
1017
1021
|
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
@@ -1030,10 +1034,12 @@ const deserializeAws_restJson1CreateFindingsReportCommandError = async (output,
|
|
|
1030
1034
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1031
1035
|
default:
|
|
1032
1036
|
const parsedBody = parsedOutput.body;
|
|
1037
|
+
const $metadata = deserializeMetadata(output);
|
|
1038
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1033
1039
|
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
1034
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1040
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1035
1041
|
$fault: "client",
|
|
1036
|
-
$metadata
|
|
1042
|
+
$metadata,
|
|
1037
1043
|
});
|
|
1038
1044
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1039
1045
|
}
|
|
@@ -1059,8 +1065,7 @@ const deserializeAws_restJson1DeleteFilterCommandError = async (output, context)
|
|
|
1059
1065
|
body: await parseBody(output.body, context),
|
|
1060
1066
|
};
|
|
1061
1067
|
let response;
|
|
1062
|
-
|
|
1063
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1068
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1064
1069
|
switch (errorCode) {
|
|
1065
1070
|
case "AccessDeniedException":
|
|
1066
1071
|
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
@@ -1079,10 +1084,12 @@ const deserializeAws_restJson1DeleteFilterCommandError = async (output, context)
|
|
|
1079
1084
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1080
1085
|
default:
|
|
1081
1086
|
const parsedBody = parsedOutput.body;
|
|
1087
|
+
const $metadata = deserializeMetadata(output);
|
|
1088
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1082
1089
|
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
1083
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1090
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1084
1091
|
$fault: "client",
|
|
1085
|
-
$metadata
|
|
1092
|
+
$metadata,
|
|
1086
1093
|
});
|
|
1087
1094
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1088
1095
|
}
|
|
@@ -1112,8 +1119,7 @@ const deserializeAws_restJson1DescribeOrganizationConfigurationCommandError = as
|
|
|
1112
1119
|
body: await parseBody(output.body, context),
|
|
1113
1120
|
};
|
|
1114
1121
|
let response;
|
|
1115
|
-
|
|
1116
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1122
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1117
1123
|
switch (errorCode) {
|
|
1118
1124
|
case "AccessDeniedException":
|
|
1119
1125
|
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
@@ -1129,10 +1135,12 @@ const deserializeAws_restJson1DescribeOrganizationConfigurationCommandError = as
|
|
|
1129
1135
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1130
1136
|
default:
|
|
1131
1137
|
const parsedBody = parsedOutput.body;
|
|
1138
|
+
const $metadata = deserializeMetadata(output);
|
|
1139
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1132
1140
|
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
1133
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1141
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1134
1142
|
$fault: "client",
|
|
1135
|
-
$metadata
|
|
1143
|
+
$metadata,
|
|
1136
1144
|
});
|
|
1137
1145
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1138
1146
|
}
|
|
@@ -1162,8 +1170,7 @@ const deserializeAws_restJson1DisableCommandError = async (output, context) => {
|
|
|
1162
1170
|
body: await parseBody(output.body, context),
|
|
1163
1171
|
};
|
|
1164
1172
|
let response;
|
|
1165
|
-
|
|
1166
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1173
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1167
1174
|
switch (errorCode) {
|
|
1168
1175
|
case "AccessDeniedException":
|
|
1169
1176
|
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
@@ -1182,10 +1189,12 @@ const deserializeAws_restJson1DisableCommandError = async (output, context) => {
|
|
|
1182
1189
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1183
1190
|
default:
|
|
1184
1191
|
const parsedBody = parsedOutput.body;
|
|
1192
|
+
const $metadata = deserializeMetadata(output);
|
|
1193
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1185
1194
|
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
1186
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1195
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1187
1196
|
$fault: "client",
|
|
1188
|
-
$metadata
|
|
1197
|
+
$metadata,
|
|
1189
1198
|
});
|
|
1190
1199
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1191
1200
|
}
|
|
@@ -1211,8 +1220,7 @@ const deserializeAws_restJson1DisableDelegatedAdminAccountCommandError = async (
|
|
|
1211
1220
|
body: await parseBody(output.body, context),
|
|
1212
1221
|
};
|
|
1213
1222
|
let response;
|
|
1214
|
-
|
|
1215
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1223
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1216
1224
|
switch (errorCode) {
|
|
1217
1225
|
case "AccessDeniedException":
|
|
1218
1226
|
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
@@ -1234,10 +1242,12 @@ const deserializeAws_restJson1DisableDelegatedAdminAccountCommandError = async (
|
|
|
1234
1242
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1235
1243
|
default:
|
|
1236
1244
|
const parsedBody = parsedOutput.body;
|
|
1245
|
+
const $metadata = deserializeMetadata(output);
|
|
1246
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1237
1247
|
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
1238
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1248
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1239
1249
|
$fault: "client",
|
|
1240
|
-
$metadata
|
|
1250
|
+
$metadata,
|
|
1241
1251
|
});
|
|
1242
1252
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1243
1253
|
}
|
|
@@ -1263,8 +1273,7 @@ const deserializeAws_restJson1DisassociateMemberCommandError = async (output, co
|
|
|
1263
1273
|
body: await parseBody(output.body, context),
|
|
1264
1274
|
};
|
|
1265
1275
|
let response;
|
|
1266
|
-
|
|
1267
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1276
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1268
1277
|
switch (errorCode) {
|
|
1269
1278
|
case "AccessDeniedException":
|
|
1270
1279
|
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
@@ -1280,10 +1289,12 @@ const deserializeAws_restJson1DisassociateMemberCommandError = async (output, co
|
|
|
1280
1289
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1281
1290
|
default:
|
|
1282
1291
|
const parsedBody = parsedOutput.body;
|
|
1292
|
+
const $metadata = deserializeMetadata(output);
|
|
1293
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1283
1294
|
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
1284
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1295
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1285
1296
|
$fault: "client",
|
|
1286
|
-
$metadata
|
|
1297
|
+
$metadata,
|
|
1287
1298
|
});
|
|
1288
1299
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1289
1300
|
}
|
|
@@ -1313,8 +1324,7 @@ const deserializeAws_restJson1EnableCommandError = async (output, context) => {
|
|
|
1313
1324
|
body: await parseBody(output.body, context),
|
|
1314
1325
|
};
|
|
1315
1326
|
let response;
|
|
1316
|
-
|
|
1317
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1327
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1318
1328
|
switch (errorCode) {
|
|
1319
1329
|
case "AccessDeniedException":
|
|
1320
1330
|
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
@@ -1333,10 +1343,12 @@ const deserializeAws_restJson1EnableCommandError = async (output, context) => {
|
|
|
1333
1343
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1334
1344
|
default:
|
|
1335
1345
|
const parsedBody = parsedOutput.body;
|
|
1346
|
+
const $metadata = deserializeMetadata(output);
|
|
1347
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1336
1348
|
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
1337
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1349
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1338
1350
|
$fault: "client",
|
|
1339
|
-
$metadata
|
|
1351
|
+
$metadata,
|
|
1340
1352
|
});
|
|
1341
1353
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1342
1354
|
}
|
|
@@ -1362,8 +1374,7 @@ const deserializeAws_restJson1EnableDelegatedAdminAccountCommandError = async (o
|
|
|
1362
1374
|
body: await parseBody(output.body, context),
|
|
1363
1375
|
};
|
|
1364
1376
|
let response;
|
|
1365
|
-
|
|
1366
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1377
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1367
1378
|
switch (errorCode) {
|
|
1368
1379
|
case "AccessDeniedException":
|
|
1369
1380
|
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
@@ -1385,10 +1396,12 @@ const deserializeAws_restJson1EnableDelegatedAdminAccountCommandError = async (o
|
|
|
1385
1396
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1386
1397
|
default:
|
|
1387
1398
|
const parsedBody = parsedOutput.body;
|
|
1399
|
+
const $metadata = deserializeMetadata(output);
|
|
1400
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1388
1401
|
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
1389
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1402
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1390
1403
|
$fault: "client",
|
|
1391
|
-
$metadata
|
|
1404
|
+
$metadata,
|
|
1392
1405
|
});
|
|
1393
1406
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1394
1407
|
}
|
|
@@ -1414,8 +1427,7 @@ const deserializeAws_restJson1GetDelegatedAdminAccountCommandError = async (outp
|
|
|
1414
1427
|
body: await parseBody(output.body, context),
|
|
1415
1428
|
};
|
|
1416
1429
|
let response;
|
|
1417
|
-
|
|
1418
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1430
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1419
1431
|
switch (errorCode) {
|
|
1420
1432
|
case "AccessDeniedException":
|
|
1421
1433
|
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
@@ -1434,10 +1446,12 @@ const deserializeAws_restJson1GetDelegatedAdminAccountCommandError = async (outp
|
|
|
1434
1446
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1435
1447
|
default:
|
|
1436
1448
|
const parsedBody = parsedOutput.body;
|
|
1449
|
+
const $metadata = deserializeMetadata(output);
|
|
1450
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1437
1451
|
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
1438
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1452
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1439
1453
|
$fault: "client",
|
|
1440
|
-
$metadata
|
|
1454
|
+
$metadata,
|
|
1441
1455
|
});
|
|
1442
1456
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1443
1457
|
}
|
|
@@ -1483,8 +1497,7 @@ const deserializeAws_restJson1GetFindingsReportStatusCommandError = async (outpu
|
|
|
1483
1497
|
body: await parseBody(output.body, context),
|
|
1484
1498
|
};
|
|
1485
1499
|
let response;
|
|
1486
|
-
|
|
1487
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1500
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1488
1501
|
switch (errorCode) {
|
|
1489
1502
|
case "AccessDeniedException":
|
|
1490
1503
|
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
@@ -1503,10 +1516,12 @@ const deserializeAws_restJson1GetFindingsReportStatusCommandError = async (outpu
|
|
|
1503
1516
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1504
1517
|
default:
|
|
1505
1518
|
const parsedBody = parsedOutput.body;
|
|
1519
|
+
const $metadata = deserializeMetadata(output);
|
|
1520
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1506
1521
|
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
1507
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1522
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1508
1523
|
$fault: "client",
|
|
1509
|
-
$metadata
|
|
1524
|
+
$metadata,
|
|
1510
1525
|
});
|
|
1511
1526
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1512
1527
|
}
|
|
@@ -1532,8 +1547,7 @@ const deserializeAws_restJson1GetMemberCommandError = async (output, context) =>
|
|
|
1532
1547
|
body: await parseBody(output.body, context),
|
|
1533
1548
|
};
|
|
1534
1549
|
let response;
|
|
1535
|
-
|
|
1536
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1550
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1537
1551
|
switch (errorCode) {
|
|
1538
1552
|
case "AccessDeniedException":
|
|
1539
1553
|
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
@@ -1552,10 +1566,12 @@ const deserializeAws_restJson1GetMemberCommandError = async (output, context) =>
|
|
|
1552
1566
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1553
1567
|
default:
|
|
1554
1568
|
const parsedBody = parsedOutput.body;
|
|
1569
|
+
const $metadata = deserializeMetadata(output);
|
|
1570
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1555
1571
|
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
1556
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1572
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1557
1573
|
$fault: "client",
|
|
1558
|
-
$metadata
|
|
1574
|
+
$metadata,
|
|
1559
1575
|
});
|
|
1560
1576
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1561
1577
|
}
|
|
@@ -1585,8 +1601,7 @@ const deserializeAws_restJson1ListAccountPermissionsCommandError = async (output
|
|
|
1585
1601
|
body: await parseBody(output.body, context),
|
|
1586
1602
|
};
|
|
1587
1603
|
let response;
|
|
1588
|
-
|
|
1589
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1604
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1590
1605
|
switch (errorCode) {
|
|
1591
1606
|
case "AccessDeniedException":
|
|
1592
1607
|
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
@@ -1602,10 +1617,12 @@ const deserializeAws_restJson1ListAccountPermissionsCommandError = async (output
|
|
|
1602
1617
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1603
1618
|
default:
|
|
1604
1619
|
const parsedBody = parsedOutput.body;
|
|
1620
|
+
const $metadata = deserializeMetadata(output);
|
|
1621
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1605
1622
|
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
1606
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1623
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1607
1624
|
$fault: "client",
|
|
1608
|
-
$metadata
|
|
1625
|
+
$metadata,
|
|
1609
1626
|
});
|
|
1610
1627
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1611
1628
|
}
|
|
@@ -1635,8 +1652,7 @@ const deserializeAws_restJson1ListCoverageCommandError = async (output, context)
|
|
|
1635
1652
|
body: await parseBody(output.body, context),
|
|
1636
1653
|
};
|
|
1637
1654
|
let response;
|
|
1638
|
-
|
|
1639
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1655
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1640
1656
|
switch (errorCode) {
|
|
1641
1657
|
case "InternalServerException":
|
|
1642
1658
|
case "com.amazonaws.inspector2#InternalServerException":
|
|
@@ -1649,10 +1665,12 @@ const deserializeAws_restJson1ListCoverageCommandError = async (output, context)
|
|
|
1649
1665
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1650
1666
|
default:
|
|
1651
1667
|
const parsedBody = parsedOutput.body;
|
|
1668
|
+
const $metadata = deserializeMetadata(output);
|
|
1669
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1652
1670
|
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
1653
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1671
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1654
1672
|
$fault: "client",
|
|
1655
|
-
$metadata
|
|
1673
|
+
$metadata,
|
|
1656
1674
|
});
|
|
1657
1675
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1658
1676
|
}
|
|
@@ -1686,8 +1704,7 @@ const deserializeAws_restJson1ListCoverageStatisticsCommandError = async (output
|
|
|
1686
1704
|
body: await parseBody(output.body, context),
|
|
1687
1705
|
};
|
|
1688
1706
|
let response;
|
|
1689
|
-
|
|
1690
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1707
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1691
1708
|
switch (errorCode) {
|
|
1692
1709
|
case "InternalServerException":
|
|
1693
1710
|
case "com.amazonaws.inspector2#InternalServerException":
|
|
@@ -1700,10 +1717,12 @@ const deserializeAws_restJson1ListCoverageStatisticsCommandError = async (output
|
|
|
1700
1717
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1701
1718
|
default:
|
|
1702
1719
|
const parsedBody = parsedOutput.body;
|
|
1720
|
+
const $metadata = deserializeMetadata(output);
|
|
1721
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1703
1722
|
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
1704
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1723
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1705
1724
|
$fault: "client",
|
|
1706
|
-
$metadata
|
|
1725
|
+
$metadata,
|
|
1707
1726
|
});
|
|
1708
1727
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1709
1728
|
}
|
|
@@ -1733,8 +1752,7 @@ const deserializeAws_restJson1ListDelegatedAdminAccountsCommandError = async (ou
|
|
|
1733
1752
|
body: await parseBody(output.body, context),
|
|
1734
1753
|
};
|
|
1735
1754
|
let response;
|
|
1736
|
-
|
|
1737
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1755
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1738
1756
|
switch (errorCode) {
|
|
1739
1757
|
case "AccessDeniedException":
|
|
1740
1758
|
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
@@ -1750,10 +1768,12 @@ const deserializeAws_restJson1ListDelegatedAdminAccountsCommandError = async (ou
|
|
|
1750
1768
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1751
1769
|
default:
|
|
1752
1770
|
const parsedBody = parsedOutput.body;
|
|
1771
|
+
const $metadata = deserializeMetadata(output);
|
|
1772
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1753
1773
|
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
1754
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1774
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1755
1775
|
$fault: "client",
|
|
1756
|
-
$metadata
|
|
1776
|
+
$metadata,
|
|
1757
1777
|
});
|
|
1758
1778
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1759
1779
|
}
|
|
@@ -1783,8 +1803,7 @@ const deserializeAws_restJson1ListFiltersCommandError = async (output, context)
|
|
|
1783
1803
|
body: await parseBody(output.body, context),
|
|
1784
1804
|
};
|
|
1785
1805
|
let response;
|
|
1786
|
-
|
|
1787
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1806
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1788
1807
|
switch (errorCode) {
|
|
1789
1808
|
case "AccessDeniedException":
|
|
1790
1809
|
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
@@ -1800,10 +1819,12 @@ const deserializeAws_restJson1ListFiltersCommandError = async (output, context)
|
|
|
1800
1819
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1801
1820
|
default:
|
|
1802
1821
|
const parsedBody = parsedOutput.body;
|
|
1822
|
+
const $metadata = deserializeMetadata(output);
|
|
1823
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1803
1824
|
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
1804
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1825
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1805
1826
|
$fault: "client",
|
|
1806
|
-
$metadata
|
|
1827
|
+
$metadata,
|
|
1807
1828
|
});
|
|
1808
1829
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1809
1830
|
}
|
|
@@ -1837,8 +1858,7 @@ const deserializeAws_restJson1ListFindingAggregationsCommandError = async (outpu
|
|
|
1837
1858
|
body: await parseBody(output.body, context),
|
|
1838
1859
|
};
|
|
1839
1860
|
let response;
|
|
1840
|
-
|
|
1841
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1861
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1842
1862
|
switch (errorCode) {
|
|
1843
1863
|
case "InternalServerException":
|
|
1844
1864
|
case "com.amazonaws.inspector2#InternalServerException":
|
|
@@ -1851,10 +1871,12 @@ const deserializeAws_restJson1ListFindingAggregationsCommandError = async (outpu
|
|
|
1851
1871
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1852
1872
|
default:
|
|
1853
1873
|
const parsedBody = parsedOutput.body;
|
|
1874
|
+
const $metadata = deserializeMetadata(output);
|
|
1875
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1854
1876
|
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
1855
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1877
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1856
1878
|
$fault: "client",
|
|
1857
|
-
$metadata
|
|
1879
|
+
$metadata,
|
|
1858
1880
|
});
|
|
1859
1881
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1860
1882
|
}
|
|
@@ -1884,8 +1906,7 @@ const deserializeAws_restJson1ListFindingsCommandError = async (output, context)
|
|
|
1884
1906
|
body: await parseBody(output.body, context),
|
|
1885
1907
|
};
|
|
1886
1908
|
let response;
|
|
1887
|
-
|
|
1888
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1909
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1889
1910
|
switch (errorCode) {
|
|
1890
1911
|
case "InternalServerException":
|
|
1891
1912
|
case "com.amazonaws.inspector2#InternalServerException":
|
|
@@ -1898,10 +1919,12 @@ const deserializeAws_restJson1ListFindingsCommandError = async (output, context)
|
|
|
1898
1919
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1899
1920
|
default:
|
|
1900
1921
|
const parsedBody = parsedOutput.body;
|
|
1922
|
+
const $metadata = deserializeMetadata(output);
|
|
1923
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1901
1924
|
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
1902
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1925
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1903
1926
|
$fault: "client",
|
|
1904
|
-
$metadata
|
|
1927
|
+
$metadata,
|
|
1905
1928
|
});
|
|
1906
1929
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1907
1930
|
}
|
|
@@ -1931,8 +1954,7 @@ const deserializeAws_restJson1ListMembersCommandError = async (output, context)
|
|
|
1931
1954
|
body: await parseBody(output.body, context),
|
|
1932
1955
|
};
|
|
1933
1956
|
let response;
|
|
1934
|
-
|
|
1935
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1957
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1936
1958
|
switch (errorCode) {
|
|
1937
1959
|
case "AccessDeniedException":
|
|
1938
1960
|
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
@@ -1948,10 +1970,12 @@ const deserializeAws_restJson1ListMembersCommandError = async (output, context)
|
|
|
1948
1970
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1949
1971
|
default:
|
|
1950
1972
|
const parsedBody = parsedOutput.body;
|
|
1973
|
+
const $metadata = deserializeMetadata(output);
|
|
1974
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1951
1975
|
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
1952
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1976
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1953
1977
|
$fault: "client",
|
|
1954
|
-
$metadata
|
|
1978
|
+
$metadata,
|
|
1955
1979
|
});
|
|
1956
1980
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1957
1981
|
}
|
|
@@ -1977,8 +2001,7 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
1977
2001
|
body: await parseBody(output.body, context),
|
|
1978
2002
|
};
|
|
1979
2003
|
let response;
|
|
1980
|
-
|
|
1981
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2004
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1982
2005
|
switch (errorCode) {
|
|
1983
2006
|
case "InternalServerException":
|
|
1984
2007
|
case "com.amazonaws.inspector2#InternalServerException":
|
|
@@ -1994,10 +2017,12 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
1994
2017
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1995
2018
|
default:
|
|
1996
2019
|
const parsedBody = parsedOutput.body;
|
|
2020
|
+
const $metadata = deserializeMetadata(output);
|
|
2021
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1997
2022
|
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
1998
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2023
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1999
2024
|
$fault: "client",
|
|
2000
|
-
$metadata
|
|
2025
|
+
$metadata,
|
|
2001
2026
|
});
|
|
2002
2027
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2003
2028
|
}
|
|
@@ -2027,8 +2052,7 @@ const deserializeAws_restJson1ListUsageTotalsCommandError = async (output, conte
|
|
|
2027
2052
|
body: await parseBody(output.body, context),
|
|
2028
2053
|
};
|
|
2029
2054
|
let response;
|
|
2030
|
-
|
|
2031
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2055
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2032
2056
|
switch (errorCode) {
|
|
2033
2057
|
case "AccessDeniedException":
|
|
2034
2058
|
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
@@ -2044,10 +2068,12 @@ const deserializeAws_restJson1ListUsageTotalsCommandError = async (output, conte
|
|
|
2044
2068
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2045
2069
|
default:
|
|
2046
2070
|
const parsedBody = parsedOutput.body;
|
|
2071
|
+
const $metadata = deserializeMetadata(output);
|
|
2072
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2047
2073
|
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
2048
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2074
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2049
2075
|
$fault: "client",
|
|
2050
|
-
$metadata
|
|
2076
|
+
$metadata,
|
|
2051
2077
|
});
|
|
2052
2078
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2053
2079
|
}
|
|
@@ -2069,8 +2095,7 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
2069
2095
|
body: await parseBody(output.body, context),
|
|
2070
2096
|
};
|
|
2071
2097
|
let response;
|
|
2072
|
-
|
|
2073
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2098
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2074
2099
|
switch (errorCode) {
|
|
2075
2100
|
case "BadRequestException":
|
|
2076
2101
|
case "com.amazonaws.inspector2#BadRequestException":
|
|
@@ -2089,10 +2114,12 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
2089
2114
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2090
2115
|
default:
|
|
2091
2116
|
const parsedBody = parsedOutput.body;
|
|
2117
|
+
const $metadata = deserializeMetadata(output);
|
|
2118
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2092
2119
|
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
2093
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2120
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2094
2121
|
$fault: "client",
|
|
2095
|
-
$metadata
|
|
2122
|
+
$metadata,
|
|
2096
2123
|
});
|
|
2097
2124
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2098
2125
|
}
|
|
@@ -2114,8 +2141,7 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
2114
2141
|
body: await parseBody(output.body, context),
|
|
2115
2142
|
};
|
|
2116
2143
|
let response;
|
|
2117
|
-
|
|
2118
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2144
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2119
2145
|
switch (errorCode) {
|
|
2120
2146
|
case "InternalServerException":
|
|
2121
2147
|
case "com.amazonaws.inspector2#InternalServerException":
|
|
@@ -2131,10 +2157,12 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
2131
2157
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2132
2158
|
default:
|
|
2133
2159
|
const parsedBody = parsedOutput.body;
|
|
2160
|
+
const $metadata = deserializeMetadata(output);
|
|
2161
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2134
2162
|
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
2135
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2163
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2136
2164
|
$fault: "client",
|
|
2137
|
-
$metadata
|
|
2165
|
+
$metadata,
|
|
2138
2166
|
});
|
|
2139
2167
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2140
2168
|
}
|
|
@@ -2160,8 +2188,7 @@ const deserializeAws_restJson1UpdateFilterCommandError = async (output, context)
|
|
|
2160
2188
|
body: await parseBody(output.body, context),
|
|
2161
2189
|
};
|
|
2162
2190
|
let response;
|
|
2163
|
-
|
|
2164
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2191
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2165
2192
|
switch (errorCode) {
|
|
2166
2193
|
case "AccessDeniedException":
|
|
2167
2194
|
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
@@ -2180,10 +2207,12 @@ const deserializeAws_restJson1UpdateFilterCommandError = async (output, context)
|
|
|
2180
2207
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2181
2208
|
default:
|
|
2182
2209
|
const parsedBody = parsedOutput.body;
|
|
2210
|
+
const $metadata = deserializeMetadata(output);
|
|
2211
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2183
2212
|
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
2184
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2213
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2185
2214
|
$fault: "client",
|
|
2186
|
-
$metadata
|
|
2215
|
+
$metadata,
|
|
2187
2216
|
});
|
|
2188
2217
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2189
2218
|
}
|
|
@@ -2209,8 +2238,7 @@ const deserializeAws_restJson1UpdateOrganizationConfigurationCommandError = asyn
|
|
|
2209
2238
|
body: await parseBody(output.body, context),
|
|
2210
2239
|
};
|
|
2211
2240
|
let response;
|
|
2212
|
-
|
|
2213
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2241
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2214
2242
|
switch (errorCode) {
|
|
2215
2243
|
case "AccessDeniedException":
|
|
2216
2244
|
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
@@ -2226,10 +2254,12 @@ const deserializeAws_restJson1UpdateOrganizationConfigurationCommandError = asyn
|
|
|
2226
2254
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2227
2255
|
default:
|
|
2228
2256
|
const parsedBody = parsedOutput.body;
|
|
2257
|
+
const $metadata = deserializeMetadata(output);
|
|
2258
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2229
2259
|
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
2230
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2260
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2231
2261
|
$fault: "client",
|
|
2232
|
-
$metadata
|
|
2262
|
+
$metadata,
|
|
2233
2263
|
});
|
|
2234
2264
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2235
2265
|
}
|
|
@@ -4065,5 +4095,4 @@ const loadRestJsonErrorCode = (output, data) => {
|
|
|
4065
4095
|
if (data["__type"] !== undefined) {
|
|
4066
4096
|
return sanitizeErrorCode(data["__type"]);
|
|
4067
4097
|
}
|
|
4068
|
-
return "";
|
|
4069
4098
|
};
|