@aws-sdk/client-rekognition 3.118.1 → 3.121.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist-cjs/protocols/Aws_json1_1.js +295 -237
- package/dist-es/protocols/Aws_json1_1.js +295 -237
- package/package.json +3 -3
|
@@ -617,8 +617,7 @@ const deserializeAws_json1_1CompareFacesCommandError = async (output, context) =
|
|
|
617
617
|
body: await parseBody(output.body, context),
|
|
618
618
|
};
|
|
619
619
|
let response;
|
|
620
|
-
|
|
621
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
620
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
622
621
|
switch (errorCode) {
|
|
623
622
|
case "AccessDeniedException":
|
|
624
623
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -646,10 +645,12 @@ const deserializeAws_json1_1CompareFacesCommandError = async (output, context) =
|
|
|
646
645
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
647
646
|
default:
|
|
648
647
|
const parsedBody = parsedOutput.body;
|
|
648
|
+
const $metadata = deserializeMetadata(output);
|
|
649
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
649
650
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
650
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
651
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
651
652
|
$fault: "client",
|
|
652
|
-
$metadata
|
|
653
|
+
$metadata,
|
|
653
654
|
});
|
|
654
655
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
655
656
|
}
|
|
@@ -674,8 +675,7 @@ const deserializeAws_json1_1CreateCollectionCommandError = async (output, contex
|
|
|
674
675
|
body: await parseBody(output.body, context),
|
|
675
676
|
};
|
|
676
677
|
let response;
|
|
677
|
-
|
|
678
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
678
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
679
679
|
switch (errorCode) {
|
|
680
680
|
case "AccessDeniedException":
|
|
681
681
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -700,10 +700,12 @@ const deserializeAws_json1_1CreateCollectionCommandError = async (output, contex
|
|
|
700
700
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
701
701
|
default:
|
|
702
702
|
const parsedBody = parsedOutput.body;
|
|
703
|
+
const $metadata = deserializeMetadata(output);
|
|
704
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
703
705
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
704
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
706
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
705
707
|
$fault: "client",
|
|
706
|
-
$metadata
|
|
708
|
+
$metadata,
|
|
707
709
|
});
|
|
708
710
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
709
711
|
}
|
|
@@ -728,8 +730,7 @@ const deserializeAws_json1_1CreateDatasetCommandError = async (output, context)
|
|
|
728
730
|
body: await parseBody(output.body, context),
|
|
729
731
|
};
|
|
730
732
|
let response;
|
|
731
|
-
|
|
732
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
733
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
733
734
|
switch (errorCode) {
|
|
734
735
|
case "AccessDeniedException":
|
|
735
736
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -760,10 +761,12 @@ const deserializeAws_json1_1CreateDatasetCommandError = async (output, context)
|
|
|
760
761
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
761
762
|
default:
|
|
762
763
|
const parsedBody = parsedOutput.body;
|
|
764
|
+
const $metadata = deserializeMetadata(output);
|
|
765
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
763
766
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
764
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
767
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
765
768
|
$fault: "client",
|
|
766
|
-
$metadata
|
|
769
|
+
$metadata,
|
|
767
770
|
});
|
|
768
771
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
769
772
|
}
|
|
@@ -788,8 +791,7 @@ const deserializeAws_json1_1CreateProjectCommandError = async (output, context)
|
|
|
788
791
|
body: await parseBody(output.body, context),
|
|
789
792
|
};
|
|
790
793
|
let response;
|
|
791
|
-
|
|
792
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
794
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
793
795
|
switch (errorCode) {
|
|
794
796
|
case "AccessDeniedException":
|
|
795
797
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -814,10 +816,12 @@ const deserializeAws_json1_1CreateProjectCommandError = async (output, context)
|
|
|
814
816
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
815
817
|
default:
|
|
816
818
|
const parsedBody = parsedOutput.body;
|
|
819
|
+
const $metadata = deserializeMetadata(output);
|
|
820
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
817
821
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
818
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
822
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
819
823
|
$fault: "client",
|
|
820
|
-
$metadata
|
|
824
|
+
$metadata,
|
|
821
825
|
});
|
|
822
826
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
823
827
|
}
|
|
@@ -842,8 +846,7 @@ const deserializeAws_json1_1CreateProjectVersionCommandError = async (output, co
|
|
|
842
846
|
body: await parseBody(output.body, context),
|
|
843
847
|
};
|
|
844
848
|
let response;
|
|
845
|
-
|
|
846
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
849
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
847
850
|
switch (errorCode) {
|
|
848
851
|
case "AccessDeniedException":
|
|
849
852
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -874,10 +877,12 @@ const deserializeAws_json1_1CreateProjectVersionCommandError = async (output, co
|
|
|
874
877
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
875
878
|
default:
|
|
876
879
|
const parsedBody = parsedOutput.body;
|
|
880
|
+
const $metadata = deserializeMetadata(output);
|
|
881
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
877
882
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
878
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
883
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
879
884
|
$fault: "client",
|
|
880
|
-
$metadata
|
|
885
|
+
$metadata,
|
|
881
886
|
});
|
|
882
887
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
883
888
|
}
|
|
@@ -902,8 +907,7 @@ const deserializeAws_json1_1CreateStreamProcessorCommandError = async (output, c
|
|
|
902
907
|
body: await parseBody(output.body, context),
|
|
903
908
|
};
|
|
904
909
|
let response;
|
|
905
|
-
|
|
906
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
910
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
907
911
|
switch (errorCode) {
|
|
908
912
|
case "AccessDeniedException":
|
|
909
913
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -931,10 +935,12 @@ const deserializeAws_json1_1CreateStreamProcessorCommandError = async (output, c
|
|
|
931
935
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
932
936
|
default:
|
|
933
937
|
const parsedBody = parsedOutput.body;
|
|
938
|
+
const $metadata = deserializeMetadata(output);
|
|
939
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
934
940
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
935
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
941
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
936
942
|
$fault: "client",
|
|
937
|
-
$metadata
|
|
943
|
+
$metadata,
|
|
938
944
|
});
|
|
939
945
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
940
946
|
}
|
|
@@ -959,8 +965,7 @@ const deserializeAws_json1_1DeleteCollectionCommandError = async (output, contex
|
|
|
959
965
|
body: await parseBody(output.body, context),
|
|
960
966
|
};
|
|
961
967
|
let response;
|
|
962
|
-
|
|
963
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
968
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
964
969
|
switch (errorCode) {
|
|
965
970
|
case "AccessDeniedException":
|
|
966
971
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -982,10 +987,12 @@ const deserializeAws_json1_1DeleteCollectionCommandError = async (output, contex
|
|
|
982
987
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
983
988
|
default:
|
|
984
989
|
const parsedBody = parsedOutput.body;
|
|
990
|
+
const $metadata = deserializeMetadata(output);
|
|
991
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
985
992
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
986
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
993
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
987
994
|
$fault: "client",
|
|
988
|
-
$metadata
|
|
995
|
+
$metadata,
|
|
989
996
|
});
|
|
990
997
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
991
998
|
}
|
|
@@ -1010,8 +1017,7 @@ const deserializeAws_json1_1DeleteDatasetCommandError = async (output, context)
|
|
|
1010
1017
|
body: await parseBody(output.body, context),
|
|
1011
1018
|
};
|
|
1012
1019
|
let response;
|
|
1013
|
-
|
|
1014
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1020
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1015
1021
|
switch (errorCode) {
|
|
1016
1022
|
case "AccessDeniedException":
|
|
1017
1023
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -1039,10 +1045,12 @@ const deserializeAws_json1_1DeleteDatasetCommandError = async (output, context)
|
|
|
1039
1045
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1040
1046
|
default:
|
|
1041
1047
|
const parsedBody = parsedOutput.body;
|
|
1048
|
+
const $metadata = deserializeMetadata(output);
|
|
1049
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1042
1050
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
1043
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1051
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1044
1052
|
$fault: "client",
|
|
1045
|
-
$metadata
|
|
1053
|
+
$metadata,
|
|
1046
1054
|
});
|
|
1047
1055
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1048
1056
|
}
|
|
@@ -1067,8 +1075,7 @@ const deserializeAws_json1_1DeleteFacesCommandError = async (output, context) =>
|
|
|
1067
1075
|
body: await parseBody(output.body, context),
|
|
1068
1076
|
};
|
|
1069
1077
|
let response;
|
|
1070
|
-
|
|
1071
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1078
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1072
1079
|
switch (errorCode) {
|
|
1073
1080
|
case "AccessDeniedException":
|
|
1074
1081
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -1090,10 +1097,12 @@ const deserializeAws_json1_1DeleteFacesCommandError = async (output, context) =>
|
|
|
1090
1097
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1091
1098
|
default:
|
|
1092
1099
|
const parsedBody = parsedOutput.body;
|
|
1100
|
+
const $metadata = deserializeMetadata(output);
|
|
1101
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1093
1102
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
1094
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1103
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1095
1104
|
$fault: "client",
|
|
1096
|
-
$metadata
|
|
1105
|
+
$metadata,
|
|
1097
1106
|
});
|
|
1098
1107
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1099
1108
|
}
|
|
@@ -1118,8 +1127,7 @@ const deserializeAws_json1_1DeleteProjectCommandError = async (output, context)
|
|
|
1118
1127
|
body: await parseBody(output.body, context),
|
|
1119
1128
|
};
|
|
1120
1129
|
let response;
|
|
1121
|
-
|
|
1122
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1130
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1123
1131
|
switch (errorCode) {
|
|
1124
1132
|
case "AccessDeniedException":
|
|
1125
1133
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -1144,10 +1152,12 @@ const deserializeAws_json1_1DeleteProjectCommandError = async (output, context)
|
|
|
1144
1152
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1145
1153
|
default:
|
|
1146
1154
|
const parsedBody = parsedOutput.body;
|
|
1155
|
+
const $metadata = deserializeMetadata(output);
|
|
1156
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1147
1157
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
1148
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1158
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1149
1159
|
$fault: "client",
|
|
1150
|
-
$metadata
|
|
1160
|
+
$metadata,
|
|
1151
1161
|
});
|
|
1152
1162
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1153
1163
|
}
|
|
@@ -1172,8 +1182,7 @@ const deserializeAws_json1_1DeleteProjectVersionCommandError = async (output, co
|
|
|
1172
1182
|
body: await parseBody(output.body, context),
|
|
1173
1183
|
};
|
|
1174
1184
|
let response;
|
|
1175
|
-
|
|
1176
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1185
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1177
1186
|
switch (errorCode) {
|
|
1178
1187
|
case "AccessDeniedException":
|
|
1179
1188
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -1198,10 +1207,12 @@ const deserializeAws_json1_1DeleteProjectVersionCommandError = async (output, co
|
|
|
1198
1207
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1199
1208
|
default:
|
|
1200
1209
|
const parsedBody = parsedOutput.body;
|
|
1210
|
+
const $metadata = deserializeMetadata(output);
|
|
1211
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1201
1212
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
1202
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1213
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1203
1214
|
$fault: "client",
|
|
1204
|
-
$metadata
|
|
1215
|
+
$metadata,
|
|
1205
1216
|
});
|
|
1206
1217
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1207
1218
|
}
|
|
@@ -1226,8 +1237,7 @@ const deserializeAws_json1_1DeleteStreamProcessorCommandError = async (output, c
|
|
|
1226
1237
|
body: await parseBody(output.body, context),
|
|
1227
1238
|
};
|
|
1228
1239
|
let response;
|
|
1229
|
-
|
|
1230
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1240
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1231
1241
|
switch (errorCode) {
|
|
1232
1242
|
case "AccessDeniedException":
|
|
1233
1243
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -1252,10 +1262,12 @@ const deserializeAws_json1_1DeleteStreamProcessorCommandError = async (output, c
|
|
|
1252
1262
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1253
1263
|
default:
|
|
1254
1264
|
const parsedBody = parsedOutput.body;
|
|
1265
|
+
const $metadata = deserializeMetadata(output);
|
|
1266
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1255
1267
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
1256
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1268
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1257
1269
|
$fault: "client",
|
|
1258
|
-
$metadata
|
|
1270
|
+
$metadata,
|
|
1259
1271
|
});
|
|
1260
1272
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1261
1273
|
}
|
|
@@ -1280,8 +1292,7 @@ const deserializeAws_json1_1DescribeCollectionCommandError = async (output, cont
|
|
|
1280
1292
|
body: await parseBody(output.body, context),
|
|
1281
1293
|
};
|
|
1282
1294
|
let response;
|
|
1283
|
-
|
|
1284
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1295
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1285
1296
|
switch (errorCode) {
|
|
1286
1297
|
case "AccessDeniedException":
|
|
1287
1298
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -1303,10 +1314,12 @@ const deserializeAws_json1_1DescribeCollectionCommandError = async (output, cont
|
|
|
1303
1314
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1304
1315
|
default:
|
|
1305
1316
|
const parsedBody = parsedOutput.body;
|
|
1317
|
+
const $metadata = deserializeMetadata(output);
|
|
1318
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1306
1319
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
1307
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1320
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1308
1321
|
$fault: "client",
|
|
1309
|
-
$metadata
|
|
1322
|
+
$metadata,
|
|
1310
1323
|
});
|
|
1311
1324
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1312
1325
|
}
|
|
@@ -1331,8 +1344,7 @@ const deserializeAws_json1_1DescribeDatasetCommandError = async (output, context
|
|
|
1331
1344
|
body: await parseBody(output.body, context),
|
|
1332
1345
|
};
|
|
1333
1346
|
let response;
|
|
1334
|
-
|
|
1335
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1347
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1336
1348
|
switch (errorCode) {
|
|
1337
1349
|
case "AccessDeniedException":
|
|
1338
1350
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -1354,10 +1366,12 @@ const deserializeAws_json1_1DescribeDatasetCommandError = async (output, context
|
|
|
1354
1366
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1355
1367
|
default:
|
|
1356
1368
|
const parsedBody = parsedOutput.body;
|
|
1369
|
+
const $metadata = deserializeMetadata(output);
|
|
1370
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1357
1371
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
1358
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1372
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1359
1373
|
$fault: "client",
|
|
1360
|
-
$metadata
|
|
1374
|
+
$metadata,
|
|
1361
1375
|
});
|
|
1362
1376
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1363
1377
|
}
|
|
@@ -1382,8 +1396,7 @@ const deserializeAws_json1_1DescribeProjectsCommandError = async (output, contex
|
|
|
1382
1396
|
body: await parseBody(output.body, context),
|
|
1383
1397
|
};
|
|
1384
1398
|
let response;
|
|
1385
|
-
|
|
1386
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1399
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1387
1400
|
switch (errorCode) {
|
|
1388
1401
|
case "AccessDeniedException":
|
|
1389
1402
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -1405,10 +1418,12 @@ const deserializeAws_json1_1DescribeProjectsCommandError = async (output, contex
|
|
|
1405
1418
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1406
1419
|
default:
|
|
1407
1420
|
const parsedBody = parsedOutput.body;
|
|
1421
|
+
const $metadata = deserializeMetadata(output);
|
|
1422
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1408
1423
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
1409
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1424
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1410
1425
|
$fault: "client",
|
|
1411
|
-
$metadata
|
|
1426
|
+
$metadata,
|
|
1412
1427
|
});
|
|
1413
1428
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1414
1429
|
}
|
|
@@ -1433,8 +1448,7 @@ const deserializeAws_json1_1DescribeProjectVersionsCommandError = async (output,
|
|
|
1433
1448
|
body: await parseBody(output.body, context),
|
|
1434
1449
|
};
|
|
1435
1450
|
let response;
|
|
1436
|
-
|
|
1437
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1451
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1438
1452
|
switch (errorCode) {
|
|
1439
1453
|
case "AccessDeniedException":
|
|
1440
1454
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -1459,10 +1473,12 @@ const deserializeAws_json1_1DescribeProjectVersionsCommandError = async (output,
|
|
|
1459
1473
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1460
1474
|
default:
|
|
1461
1475
|
const parsedBody = parsedOutput.body;
|
|
1476
|
+
const $metadata = deserializeMetadata(output);
|
|
1477
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1462
1478
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
1463
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1479
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1464
1480
|
$fault: "client",
|
|
1465
|
-
$metadata
|
|
1481
|
+
$metadata,
|
|
1466
1482
|
});
|
|
1467
1483
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1468
1484
|
}
|
|
@@ -1487,8 +1503,7 @@ const deserializeAws_json1_1DescribeStreamProcessorCommandError = async (output,
|
|
|
1487
1503
|
body: await parseBody(output.body, context),
|
|
1488
1504
|
};
|
|
1489
1505
|
let response;
|
|
1490
|
-
|
|
1491
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1506
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1492
1507
|
switch (errorCode) {
|
|
1493
1508
|
case "AccessDeniedException":
|
|
1494
1509
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -1510,10 +1525,12 @@ const deserializeAws_json1_1DescribeStreamProcessorCommandError = async (output,
|
|
|
1510
1525
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1511
1526
|
default:
|
|
1512
1527
|
const parsedBody = parsedOutput.body;
|
|
1528
|
+
const $metadata = deserializeMetadata(output);
|
|
1529
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1513
1530
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
1514
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1531
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1515
1532
|
$fault: "client",
|
|
1516
|
-
$metadata
|
|
1533
|
+
$metadata,
|
|
1517
1534
|
});
|
|
1518
1535
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1519
1536
|
}
|
|
@@ -1538,8 +1555,7 @@ const deserializeAws_json1_1DetectCustomLabelsCommandError = async (output, cont
|
|
|
1538
1555
|
body: await parseBody(output.body, context),
|
|
1539
1556
|
};
|
|
1540
1557
|
let response;
|
|
1541
|
-
|
|
1542
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1558
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1543
1559
|
switch (errorCode) {
|
|
1544
1560
|
case "AccessDeniedException":
|
|
1545
1561
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -1576,10 +1592,12 @@ const deserializeAws_json1_1DetectCustomLabelsCommandError = async (output, cont
|
|
|
1576
1592
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1577
1593
|
default:
|
|
1578
1594
|
const parsedBody = parsedOutput.body;
|
|
1595
|
+
const $metadata = deserializeMetadata(output);
|
|
1596
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1579
1597
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
1580
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1598
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1581
1599
|
$fault: "client",
|
|
1582
|
-
$metadata
|
|
1600
|
+
$metadata,
|
|
1583
1601
|
});
|
|
1584
1602
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1585
1603
|
}
|
|
@@ -1604,8 +1622,7 @@ const deserializeAws_json1_1DetectFacesCommandError = async (output, context) =>
|
|
|
1604
1622
|
body: await parseBody(output.body, context),
|
|
1605
1623
|
};
|
|
1606
1624
|
let response;
|
|
1607
|
-
|
|
1608
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1625
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1609
1626
|
switch (errorCode) {
|
|
1610
1627
|
case "AccessDeniedException":
|
|
1611
1628
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -1633,10 +1650,12 @@ const deserializeAws_json1_1DetectFacesCommandError = async (output, context) =>
|
|
|
1633
1650
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1634
1651
|
default:
|
|
1635
1652
|
const parsedBody = parsedOutput.body;
|
|
1653
|
+
const $metadata = deserializeMetadata(output);
|
|
1654
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1636
1655
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
1637
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1656
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1638
1657
|
$fault: "client",
|
|
1639
|
-
$metadata
|
|
1658
|
+
$metadata,
|
|
1640
1659
|
});
|
|
1641
1660
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1642
1661
|
}
|
|
@@ -1661,8 +1680,7 @@ const deserializeAws_json1_1DetectLabelsCommandError = async (output, context) =
|
|
|
1661
1680
|
body: await parseBody(output.body, context),
|
|
1662
1681
|
};
|
|
1663
1682
|
let response;
|
|
1664
|
-
|
|
1665
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1683
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1666
1684
|
switch (errorCode) {
|
|
1667
1685
|
case "AccessDeniedException":
|
|
1668
1686
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -1690,10 +1708,12 @@ const deserializeAws_json1_1DetectLabelsCommandError = async (output, context) =
|
|
|
1690
1708
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1691
1709
|
default:
|
|
1692
1710
|
const parsedBody = parsedOutput.body;
|
|
1711
|
+
const $metadata = deserializeMetadata(output);
|
|
1712
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1693
1713
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
1694
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1714
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1695
1715
|
$fault: "client",
|
|
1696
|
-
$metadata
|
|
1716
|
+
$metadata,
|
|
1697
1717
|
});
|
|
1698
1718
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1699
1719
|
}
|
|
@@ -1718,8 +1738,7 @@ const deserializeAws_json1_1DetectModerationLabelsCommandError = async (output,
|
|
|
1718
1738
|
body: await parseBody(output.body, context),
|
|
1719
1739
|
};
|
|
1720
1740
|
let response;
|
|
1721
|
-
|
|
1722
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1741
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1723
1742
|
switch (errorCode) {
|
|
1724
1743
|
case "AccessDeniedException":
|
|
1725
1744
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -1750,10 +1769,12 @@ const deserializeAws_json1_1DetectModerationLabelsCommandError = async (output,
|
|
|
1750
1769
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1751
1770
|
default:
|
|
1752
1771
|
const parsedBody = parsedOutput.body;
|
|
1772
|
+
const $metadata = deserializeMetadata(output);
|
|
1773
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1753
1774
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
1754
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1775
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1755
1776
|
$fault: "client",
|
|
1756
|
-
$metadata
|
|
1777
|
+
$metadata,
|
|
1757
1778
|
});
|
|
1758
1779
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1759
1780
|
}
|
|
@@ -1778,8 +1799,7 @@ const deserializeAws_json1_1DetectProtectiveEquipmentCommandError = async (outpu
|
|
|
1778
1799
|
body: await parseBody(output.body, context),
|
|
1779
1800
|
};
|
|
1780
1801
|
let response;
|
|
1781
|
-
|
|
1782
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1802
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1783
1803
|
switch (errorCode) {
|
|
1784
1804
|
case "AccessDeniedException":
|
|
1785
1805
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -1807,10 +1827,12 @@ const deserializeAws_json1_1DetectProtectiveEquipmentCommandError = async (outpu
|
|
|
1807
1827
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1808
1828
|
default:
|
|
1809
1829
|
const parsedBody = parsedOutput.body;
|
|
1830
|
+
const $metadata = deserializeMetadata(output);
|
|
1831
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1810
1832
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
1811
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1833
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1812
1834
|
$fault: "client",
|
|
1813
|
-
$metadata
|
|
1835
|
+
$metadata,
|
|
1814
1836
|
});
|
|
1815
1837
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1816
1838
|
}
|
|
@@ -1835,8 +1857,7 @@ const deserializeAws_json1_1DetectTextCommandError = async (output, context) =>
|
|
|
1835
1857
|
body: await parseBody(output.body, context),
|
|
1836
1858
|
};
|
|
1837
1859
|
let response;
|
|
1838
|
-
|
|
1839
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1860
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1840
1861
|
switch (errorCode) {
|
|
1841
1862
|
case "AccessDeniedException":
|
|
1842
1863
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -1864,10 +1885,12 @@ const deserializeAws_json1_1DetectTextCommandError = async (output, context) =>
|
|
|
1864
1885
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1865
1886
|
default:
|
|
1866
1887
|
const parsedBody = parsedOutput.body;
|
|
1888
|
+
const $metadata = deserializeMetadata(output);
|
|
1889
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1867
1890
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
1868
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1891
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1869
1892
|
$fault: "client",
|
|
1870
|
-
$metadata
|
|
1893
|
+
$metadata,
|
|
1871
1894
|
});
|
|
1872
1895
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1873
1896
|
}
|
|
@@ -1892,8 +1915,7 @@ const deserializeAws_json1_1DistributeDatasetEntriesCommandError = async (output
|
|
|
1892
1915
|
body: await parseBody(output.body, context),
|
|
1893
1916
|
};
|
|
1894
1917
|
let response;
|
|
1895
|
-
|
|
1896
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1918
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1897
1919
|
switch (errorCode) {
|
|
1898
1920
|
case "AccessDeniedException":
|
|
1899
1921
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -1918,10 +1940,12 @@ const deserializeAws_json1_1DistributeDatasetEntriesCommandError = async (output
|
|
|
1918
1940
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1919
1941
|
default:
|
|
1920
1942
|
const parsedBody = parsedOutput.body;
|
|
1943
|
+
const $metadata = deserializeMetadata(output);
|
|
1944
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1921
1945
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
1922
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1946
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1923
1947
|
$fault: "client",
|
|
1924
|
-
$metadata
|
|
1948
|
+
$metadata,
|
|
1925
1949
|
});
|
|
1926
1950
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1927
1951
|
}
|
|
@@ -1946,8 +1970,7 @@ const deserializeAws_json1_1GetCelebrityInfoCommandError = async (output, contex
|
|
|
1946
1970
|
body: await parseBody(output.body, context),
|
|
1947
1971
|
};
|
|
1948
1972
|
let response;
|
|
1949
|
-
|
|
1950
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1973
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1951
1974
|
switch (errorCode) {
|
|
1952
1975
|
case "AccessDeniedException":
|
|
1953
1976
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -1969,10 +1992,12 @@ const deserializeAws_json1_1GetCelebrityInfoCommandError = async (output, contex
|
|
|
1969
1992
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1970
1993
|
default:
|
|
1971
1994
|
const parsedBody = parsedOutput.body;
|
|
1995
|
+
const $metadata = deserializeMetadata(output);
|
|
1996
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1972
1997
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
1973
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1998
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1974
1999
|
$fault: "client",
|
|
1975
|
-
$metadata
|
|
2000
|
+
$metadata,
|
|
1976
2001
|
});
|
|
1977
2002
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1978
2003
|
}
|
|
@@ -1997,8 +2022,7 @@ const deserializeAws_json1_1GetCelebrityRecognitionCommandError = async (output,
|
|
|
1997
2022
|
body: await parseBody(output.body, context),
|
|
1998
2023
|
};
|
|
1999
2024
|
let response;
|
|
2000
|
-
|
|
2001
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2025
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2002
2026
|
switch (errorCode) {
|
|
2003
2027
|
case "AccessDeniedException":
|
|
2004
2028
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -2023,10 +2047,12 @@ const deserializeAws_json1_1GetCelebrityRecognitionCommandError = async (output,
|
|
|
2023
2047
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
2024
2048
|
default:
|
|
2025
2049
|
const parsedBody = parsedOutput.body;
|
|
2050
|
+
const $metadata = deserializeMetadata(output);
|
|
2051
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2026
2052
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
2027
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2053
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2028
2054
|
$fault: "client",
|
|
2029
|
-
$metadata
|
|
2055
|
+
$metadata,
|
|
2030
2056
|
});
|
|
2031
2057
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2032
2058
|
}
|
|
@@ -2051,8 +2077,7 @@ const deserializeAws_json1_1GetContentModerationCommandError = async (output, co
|
|
|
2051
2077
|
body: await parseBody(output.body, context),
|
|
2052
2078
|
};
|
|
2053
2079
|
let response;
|
|
2054
|
-
|
|
2055
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2080
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2056
2081
|
switch (errorCode) {
|
|
2057
2082
|
case "AccessDeniedException":
|
|
2058
2083
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -2077,10 +2102,12 @@ const deserializeAws_json1_1GetContentModerationCommandError = async (output, co
|
|
|
2077
2102
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
2078
2103
|
default:
|
|
2079
2104
|
const parsedBody = parsedOutput.body;
|
|
2105
|
+
const $metadata = deserializeMetadata(output);
|
|
2106
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2080
2107
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
2081
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2108
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2082
2109
|
$fault: "client",
|
|
2083
|
-
$metadata
|
|
2110
|
+
$metadata,
|
|
2084
2111
|
});
|
|
2085
2112
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2086
2113
|
}
|
|
@@ -2105,8 +2132,7 @@ const deserializeAws_json1_1GetFaceDetectionCommandError = async (output, contex
|
|
|
2105
2132
|
body: await parseBody(output.body, context),
|
|
2106
2133
|
};
|
|
2107
2134
|
let response;
|
|
2108
|
-
|
|
2109
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2135
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2110
2136
|
switch (errorCode) {
|
|
2111
2137
|
case "AccessDeniedException":
|
|
2112
2138
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -2131,10 +2157,12 @@ const deserializeAws_json1_1GetFaceDetectionCommandError = async (output, contex
|
|
|
2131
2157
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(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 RekognitionServiceException_1.RekognitionServiceException({
|
|
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
|
}
|
|
@@ -2159,8 +2187,7 @@ const deserializeAws_json1_1GetFaceSearchCommandError = async (output, context)
|
|
|
2159
2187
|
body: await parseBody(output.body, context),
|
|
2160
2188
|
};
|
|
2161
2189
|
let response;
|
|
2162
|
-
|
|
2163
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2190
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2164
2191
|
switch (errorCode) {
|
|
2165
2192
|
case "AccessDeniedException":
|
|
2166
2193
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -2185,10 +2212,12 @@ const deserializeAws_json1_1GetFaceSearchCommandError = async (output, context)
|
|
|
2185
2212
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
2186
2213
|
default:
|
|
2187
2214
|
const parsedBody = parsedOutput.body;
|
|
2215
|
+
const $metadata = deserializeMetadata(output);
|
|
2216
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2188
2217
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
2189
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2218
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2190
2219
|
$fault: "client",
|
|
2191
|
-
$metadata
|
|
2220
|
+
$metadata,
|
|
2192
2221
|
});
|
|
2193
2222
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2194
2223
|
}
|
|
@@ -2213,8 +2242,7 @@ const deserializeAws_json1_1GetLabelDetectionCommandError = async (output, conte
|
|
|
2213
2242
|
body: await parseBody(output.body, context),
|
|
2214
2243
|
};
|
|
2215
2244
|
let response;
|
|
2216
|
-
|
|
2217
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2245
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2218
2246
|
switch (errorCode) {
|
|
2219
2247
|
case "AccessDeniedException":
|
|
2220
2248
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -2239,10 +2267,12 @@ const deserializeAws_json1_1GetLabelDetectionCommandError = async (output, conte
|
|
|
2239
2267
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
2240
2268
|
default:
|
|
2241
2269
|
const parsedBody = parsedOutput.body;
|
|
2270
|
+
const $metadata = deserializeMetadata(output);
|
|
2271
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2242
2272
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
2243
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2273
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2244
2274
|
$fault: "client",
|
|
2245
|
-
$metadata
|
|
2275
|
+
$metadata,
|
|
2246
2276
|
});
|
|
2247
2277
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2248
2278
|
}
|
|
@@ -2267,8 +2297,7 @@ const deserializeAws_json1_1GetPersonTrackingCommandError = async (output, conte
|
|
|
2267
2297
|
body: await parseBody(output.body, context),
|
|
2268
2298
|
};
|
|
2269
2299
|
let response;
|
|
2270
|
-
|
|
2271
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2300
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2272
2301
|
switch (errorCode) {
|
|
2273
2302
|
case "AccessDeniedException":
|
|
2274
2303
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -2293,10 +2322,12 @@ const deserializeAws_json1_1GetPersonTrackingCommandError = async (output, conte
|
|
|
2293
2322
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
2294
2323
|
default:
|
|
2295
2324
|
const parsedBody = parsedOutput.body;
|
|
2325
|
+
const $metadata = deserializeMetadata(output);
|
|
2326
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2296
2327
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
2297
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2328
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2298
2329
|
$fault: "client",
|
|
2299
|
-
$metadata
|
|
2330
|
+
$metadata,
|
|
2300
2331
|
});
|
|
2301
2332
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2302
2333
|
}
|
|
@@ -2321,8 +2352,7 @@ const deserializeAws_json1_1GetSegmentDetectionCommandError = async (output, con
|
|
|
2321
2352
|
body: await parseBody(output.body, context),
|
|
2322
2353
|
};
|
|
2323
2354
|
let response;
|
|
2324
|
-
|
|
2325
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2355
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2326
2356
|
switch (errorCode) {
|
|
2327
2357
|
case "AccessDeniedException":
|
|
2328
2358
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -2347,10 +2377,12 @@ const deserializeAws_json1_1GetSegmentDetectionCommandError = async (output, con
|
|
|
2347
2377
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
2348
2378
|
default:
|
|
2349
2379
|
const parsedBody = parsedOutput.body;
|
|
2380
|
+
const $metadata = deserializeMetadata(output);
|
|
2381
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2350
2382
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
2351
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2383
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2352
2384
|
$fault: "client",
|
|
2353
|
-
$metadata
|
|
2385
|
+
$metadata,
|
|
2354
2386
|
});
|
|
2355
2387
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2356
2388
|
}
|
|
@@ -2375,8 +2407,7 @@ const deserializeAws_json1_1GetTextDetectionCommandError = async (output, contex
|
|
|
2375
2407
|
body: await parseBody(output.body, context),
|
|
2376
2408
|
};
|
|
2377
2409
|
let response;
|
|
2378
|
-
|
|
2379
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2410
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2380
2411
|
switch (errorCode) {
|
|
2381
2412
|
case "AccessDeniedException":
|
|
2382
2413
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -2401,10 +2432,12 @@ const deserializeAws_json1_1GetTextDetectionCommandError = async (output, contex
|
|
|
2401
2432
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
2402
2433
|
default:
|
|
2403
2434
|
const parsedBody = parsedOutput.body;
|
|
2435
|
+
const $metadata = deserializeMetadata(output);
|
|
2436
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2404
2437
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
2405
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2438
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2406
2439
|
$fault: "client",
|
|
2407
|
-
$metadata
|
|
2440
|
+
$metadata,
|
|
2408
2441
|
});
|
|
2409
2442
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2410
2443
|
}
|
|
@@ -2429,8 +2462,7 @@ const deserializeAws_json1_1IndexFacesCommandError = async (output, context) =>
|
|
|
2429
2462
|
body: await parseBody(output.body, context),
|
|
2430
2463
|
};
|
|
2431
2464
|
let response;
|
|
2432
|
-
|
|
2433
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2465
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2434
2466
|
switch (errorCode) {
|
|
2435
2467
|
case "AccessDeniedException":
|
|
2436
2468
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -2464,10 +2496,12 @@ const deserializeAws_json1_1IndexFacesCommandError = async (output, context) =>
|
|
|
2464
2496
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
2465
2497
|
default:
|
|
2466
2498
|
const parsedBody = parsedOutput.body;
|
|
2499
|
+
const $metadata = deserializeMetadata(output);
|
|
2500
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2467
2501
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
2468
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2502
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2469
2503
|
$fault: "client",
|
|
2470
|
-
$metadata
|
|
2504
|
+
$metadata,
|
|
2471
2505
|
});
|
|
2472
2506
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2473
2507
|
}
|
|
@@ -2492,8 +2526,7 @@ const deserializeAws_json1_1ListCollectionsCommandError = async (output, context
|
|
|
2492
2526
|
body: await parseBody(output.body, context),
|
|
2493
2527
|
};
|
|
2494
2528
|
let response;
|
|
2495
|
-
|
|
2496
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2529
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2497
2530
|
switch (errorCode) {
|
|
2498
2531
|
case "AccessDeniedException":
|
|
2499
2532
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -2518,10 +2551,12 @@ const deserializeAws_json1_1ListCollectionsCommandError = async (output, context
|
|
|
2518
2551
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
2519
2552
|
default:
|
|
2520
2553
|
const parsedBody = parsedOutput.body;
|
|
2554
|
+
const $metadata = deserializeMetadata(output);
|
|
2555
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2521
2556
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
2522
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2557
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2523
2558
|
$fault: "client",
|
|
2524
|
-
$metadata
|
|
2559
|
+
$metadata,
|
|
2525
2560
|
});
|
|
2526
2561
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2527
2562
|
}
|
|
@@ -2546,8 +2581,7 @@ const deserializeAws_json1_1ListDatasetEntriesCommandError = async (output, cont
|
|
|
2546
2581
|
body: await parseBody(output.body, context),
|
|
2547
2582
|
};
|
|
2548
2583
|
let response;
|
|
2549
|
-
|
|
2550
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2584
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2551
2585
|
switch (errorCode) {
|
|
2552
2586
|
case "AccessDeniedException":
|
|
2553
2587
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -2578,10 +2612,12 @@ const deserializeAws_json1_1ListDatasetEntriesCommandError = async (output, cont
|
|
|
2578
2612
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
2579
2613
|
default:
|
|
2580
2614
|
const parsedBody = parsedOutput.body;
|
|
2615
|
+
const $metadata = deserializeMetadata(output);
|
|
2616
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2581
2617
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
2582
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2618
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2583
2619
|
$fault: "client",
|
|
2584
|
-
$metadata
|
|
2620
|
+
$metadata,
|
|
2585
2621
|
});
|
|
2586
2622
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2587
2623
|
}
|
|
@@ -2606,8 +2642,7 @@ const deserializeAws_json1_1ListDatasetLabelsCommandError = async (output, conte
|
|
|
2606
2642
|
body: await parseBody(output.body, context),
|
|
2607
2643
|
};
|
|
2608
2644
|
let response;
|
|
2609
|
-
|
|
2610
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2645
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2611
2646
|
switch (errorCode) {
|
|
2612
2647
|
case "AccessDeniedException":
|
|
2613
2648
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -2638,10 +2673,12 @@ const deserializeAws_json1_1ListDatasetLabelsCommandError = async (output, conte
|
|
|
2638
2673
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
2639
2674
|
default:
|
|
2640
2675
|
const parsedBody = parsedOutput.body;
|
|
2676
|
+
const $metadata = deserializeMetadata(output);
|
|
2677
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2641
2678
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
2642
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2679
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2643
2680
|
$fault: "client",
|
|
2644
|
-
$metadata
|
|
2681
|
+
$metadata,
|
|
2645
2682
|
});
|
|
2646
2683
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2647
2684
|
}
|
|
@@ -2666,8 +2703,7 @@ const deserializeAws_json1_1ListFacesCommandError = async (output, context) => {
|
|
|
2666
2703
|
body: await parseBody(output.body, context),
|
|
2667
2704
|
};
|
|
2668
2705
|
let response;
|
|
2669
|
-
|
|
2670
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2706
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2671
2707
|
switch (errorCode) {
|
|
2672
2708
|
case "AccessDeniedException":
|
|
2673
2709
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -2692,10 +2728,12 @@ const deserializeAws_json1_1ListFacesCommandError = async (output, context) => {
|
|
|
2692
2728
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
2693
2729
|
default:
|
|
2694
2730
|
const parsedBody = parsedOutput.body;
|
|
2731
|
+
const $metadata = deserializeMetadata(output);
|
|
2732
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2695
2733
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
2696
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2734
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2697
2735
|
$fault: "client",
|
|
2698
|
-
$metadata
|
|
2736
|
+
$metadata,
|
|
2699
2737
|
});
|
|
2700
2738
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2701
2739
|
}
|
|
@@ -2720,8 +2758,7 @@ const deserializeAws_json1_1ListStreamProcessorsCommandError = async (output, co
|
|
|
2720
2758
|
body: await parseBody(output.body, context),
|
|
2721
2759
|
};
|
|
2722
2760
|
let response;
|
|
2723
|
-
|
|
2724
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2761
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2725
2762
|
switch (errorCode) {
|
|
2726
2763
|
case "AccessDeniedException":
|
|
2727
2764
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -2743,10 +2780,12 @@ const deserializeAws_json1_1ListStreamProcessorsCommandError = async (output, co
|
|
|
2743
2780
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
2744
2781
|
default:
|
|
2745
2782
|
const parsedBody = parsedOutput.body;
|
|
2783
|
+
const $metadata = deserializeMetadata(output);
|
|
2784
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2746
2785
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
2747
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2786
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2748
2787
|
$fault: "client",
|
|
2749
|
-
$metadata
|
|
2788
|
+
$metadata,
|
|
2750
2789
|
});
|
|
2751
2790
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2752
2791
|
}
|
|
@@ -2771,8 +2810,7 @@ const deserializeAws_json1_1ListTagsForResourceCommandError = async (output, con
|
|
|
2771
2810
|
body: await parseBody(output.body, context),
|
|
2772
2811
|
};
|
|
2773
2812
|
let response;
|
|
2774
|
-
|
|
2775
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2813
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2776
2814
|
switch (errorCode) {
|
|
2777
2815
|
case "AccessDeniedException":
|
|
2778
2816
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -2794,10 +2832,12 @@ const deserializeAws_json1_1ListTagsForResourceCommandError = async (output, con
|
|
|
2794
2832
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
2795
2833
|
default:
|
|
2796
2834
|
const parsedBody = parsedOutput.body;
|
|
2835
|
+
const $metadata = deserializeMetadata(output);
|
|
2836
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2797
2837
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
2798
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2838
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2799
2839
|
$fault: "client",
|
|
2800
|
-
$metadata
|
|
2840
|
+
$metadata,
|
|
2801
2841
|
});
|
|
2802
2842
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2803
2843
|
}
|
|
@@ -2822,8 +2862,7 @@ const deserializeAws_json1_1RecognizeCelebritiesCommandError = async (output, co
|
|
|
2822
2862
|
body: await parseBody(output.body, context),
|
|
2823
2863
|
};
|
|
2824
2864
|
let response;
|
|
2825
|
-
|
|
2826
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2865
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2827
2866
|
switch (errorCode) {
|
|
2828
2867
|
case "AccessDeniedException":
|
|
2829
2868
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -2851,10 +2890,12 @@ const deserializeAws_json1_1RecognizeCelebritiesCommandError = async (output, co
|
|
|
2851
2890
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
2852
2891
|
default:
|
|
2853
2892
|
const parsedBody = parsedOutput.body;
|
|
2893
|
+
const $metadata = deserializeMetadata(output);
|
|
2894
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2854
2895
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
2855
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2896
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2856
2897
|
$fault: "client",
|
|
2857
|
-
$metadata
|
|
2898
|
+
$metadata,
|
|
2858
2899
|
});
|
|
2859
2900
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2860
2901
|
}
|
|
@@ -2879,8 +2920,7 @@ const deserializeAws_json1_1SearchFacesCommandError = async (output, context) =>
|
|
|
2879
2920
|
body: await parseBody(output.body, context),
|
|
2880
2921
|
};
|
|
2881
2922
|
let response;
|
|
2882
|
-
|
|
2883
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2923
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2884
2924
|
switch (errorCode) {
|
|
2885
2925
|
case "AccessDeniedException":
|
|
2886
2926
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -2902,10 +2942,12 @@ const deserializeAws_json1_1SearchFacesCommandError = async (output, context) =>
|
|
|
2902
2942
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
2903
2943
|
default:
|
|
2904
2944
|
const parsedBody = parsedOutput.body;
|
|
2945
|
+
const $metadata = deserializeMetadata(output);
|
|
2946
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2905
2947
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
2906
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2948
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2907
2949
|
$fault: "client",
|
|
2908
|
-
$metadata
|
|
2950
|
+
$metadata,
|
|
2909
2951
|
});
|
|
2910
2952
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2911
2953
|
}
|
|
@@ -2930,8 +2972,7 @@ const deserializeAws_json1_1SearchFacesByImageCommandError = async (output, cont
|
|
|
2930
2972
|
body: await parseBody(output.body, context),
|
|
2931
2973
|
};
|
|
2932
2974
|
let response;
|
|
2933
|
-
|
|
2934
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2975
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2935
2976
|
switch (errorCode) {
|
|
2936
2977
|
case "AccessDeniedException":
|
|
2937
2978
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -2962,10 +3003,12 @@ const deserializeAws_json1_1SearchFacesByImageCommandError = async (output, cont
|
|
|
2962
3003
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
2963
3004
|
default:
|
|
2964
3005
|
const parsedBody = parsedOutput.body;
|
|
3006
|
+
const $metadata = deserializeMetadata(output);
|
|
3007
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2965
3008
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
2966
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3009
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2967
3010
|
$fault: "client",
|
|
2968
|
-
$metadata
|
|
3011
|
+
$metadata,
|
|
2969
3012
|
});
|
|
2970
3013
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2971
3014
|
}
|
|
@@ -2990,8 +3033,7 @@ const deserializeAws_json1_1StartCelebrityRecognitionCommandError = async (outpu
|
|
|
2990
3033
|
body: await parseBody(output.body, context),
|
|
2991
3034
|
};
|
|
2992
3035
|
let response;
|
|
2993
|
-
|
|
2994
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3036
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2995
3037
|
switch (errorCode) {
|
|
2996
3038
|
case "AccessDeniedException":
|
|
2997
3039
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -3022,10 +3064,12 @@ const deserializeAws_json1_1StartCelebrityRecognitionCommandError = async (outpu
|
|
|
3022
3064
|
throw await deserializeAws_json1_1VideoTooLargeExceptionResponse(parsedOutput, context);
|
|
3023
3065
|
default:
|
|
3024
3066
|
const parsedBody = parsedOutput.body;
|
|
3067
|
+
const $metadata = deserializeMetadata(output);
|
|
3068
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3025
3069
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
3026
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3070
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3027
3071
|
$fault: "client",
|
|
3028
|
-
$metadata
|
|
3072
|
+
$metadata,
|
|
3029
3073
|
});
|
|
3030
3074
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3031
3075
|
}
|
|
@@ -3050,8 +3094,7 @@ const deserializeAws_json1_1StartContentModerationCommandError = async (output,
|
|
|
3050
3094
|
body: await parseBody(output.body, context),
|
|
3051
3095
|
};
|
|
3052
3096
|
let response;
|
|
3053
|
-
|
|
3054
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3097
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3055
3098
|
switch (errorCode) {
|
|
3056
3099
|
case "AccessDeniedException":
|
|
3057
3100
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -3082,10 +3125,12 @@ const deserializeAws_json1_1StartContentModerationCommandError = async (output,
|
|
|
3082
3125
|
throw await deserializeAws_json1_1VideoTooLargeExceptionResponse(parsedOutput, context);
|
|
3083
3126
|
default:
|
|
3084
3127
|
const parsedBody = parsedOutput.body;
|
|
3128
|
+
const $metadata = deserializeMetadata(output);
|
|
3129
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3085
3130
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
3086
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3131
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3087
3132
|
$fault: "client",
|
|
3088
|
-
$metadata
|
|
3133
|
+
$metadata,
|
|
3089
3134
|
});
|
|
3090
3135
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3091
3136
|
}
|
|
@@ -3110,8 +3155,7 @@ const deserializeAws_json1_1StartFaceDetectionCommandError = async (output, cont
|
|
|
3110
3155
|
body: await parseBody(output.body, context),
|
|
3111
3156
|
};
|
|
3112
3157
|
let response;
|
|
3113
|
-
|
|
3114
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3158
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3115
3159
|
switch (errorCode) {
|
|
3116
3160
|
case "AccessDeniedException":
|
|
3117
3161
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -3142,10 +3186,12 @@ const deserializeAws_json1_1StartFaceDetectionCommandError = async (output, cont
|
|
|
3142
3186
|
throw await deserializeAws_json1_1VideoTooLargeExceptionResponse(parsedOutput, context);
|
|
3143
3187
|
default:
|
|
3144
3188
|
const parsedBody = parsedOutput.body;
|
|
3189
|
+
const $metadata = deserializeMetadata(output);
|
|
3190
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3145
3191
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
3146
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3192
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3147
3193
|
$fault: "client",
|
|
3148
|
-
$metadata
|
|
3194
|
+
$metadata,
|
|
3149
3195
|
});
|
|
3150
3196
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3151
3197
|
}
|
|
@@ -3170,8 +3216,7 @@ const deserializeAws_json1_1StartFaceSearchCommandError = async (output, context
|
|
|
3170
3216
|
body: await parseBody(output.body, context),
|
|
3171
3217
|
};
|
|
3172
3218
|
let response;
|
|
3173
|
-
|
|
3174
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3219
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3175
3220
|
switch (errorCode) {
|
|
3176
3221
|
case "AccessDeniedException":
|
|
3177
3222
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -3205,10 +3250,12 @@ const deserializeAws_json1_1StartFaceSearchCommandError = async (output, context
|
|
|
3205
3250
|
throw await deserializeAws_json1_1VideoTooLargeExceptionResponse(parsedOutput, context);
|
|
3206
3251
|
default:
|
|
3207
3252
|
const parsedBody = parsedOutput.body;
|
|
3253
|
+
const $metadata = deserializeMetadata(output);
|
|
3254
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3208
3255
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
3209
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3256
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3210
3257
|
$fault: "client",
|
|
3211
|
-
$metadata
|
|
3258
|
+
$metadata,
|
|
3212
3259
|
});
|
|
3213
3260
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3214
3261
|
}
|
|
@@ -3233,8 +3280,7 @@ const deserializeAws_json1_1StartLabelDetectionCommandError = async (output, con
|
|
|
3233
3280
|
body: await parseBody(output.body, context),
|
|
3234
3281
|
};
|
|
3235
3282
|
let response;
|
|
3236
|
-
|
|
3237
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3283
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3238
3284
|
switch (errorCode) {
|
|
3239
3285
|
case "AccessDeniedException":
|
|
3240
3286
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -3265,10 +3311,12 @@ const deserializeAws_json1_1StartLabelDetectionCommandError = async (output, con
|
|
|
3265
3311
|
throw await deserializeAws_json1_1VideoTooLargeExceptionResponse(parsedOutput, context);
|
|
3266
3312
|
default:
|
|
3267
3313
|
const parsedBody = parsedOutput.body;
|
|
3314
|
+
const $metadata = deserializeMetadata(output);
|
|
3315
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3268
3316
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
3269
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3317
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3270
3318
|
$fault: "client",
|
|
3271
|
-
$metadata
|
|
3319
|
+
$metadata,
|
|
3272
3320
|
});
|
|
3273
3321
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3274
3322
|
}
|
|
@@ -3293,8 +3341,7 @@ const deserializeAws_json1_1StartPersonTrackingCommandError = async (output, con
|
|
|
3293
3341
|
body: await parseBody(output.body, context),
|
|
3294
3342
|
};
|
|
3295
3343
|
let response;
|
|
3296
|
-
|
|
3297
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3344
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3298
3345
|
switch (errorCode) {
|
|
3299
3346
|
case "AccessDeniedException":
|
|
3300
3347
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -3325,10 +3372,12 @@ const deserializeAws_json1_1StartPersonTrackingCommandError = async (output, con
|
|
|
3325
3372
|
throw await deserializeAws_json1_1VideoTooLargeExceptionResponse(parsedOutput, context);
|
|
3326
3373
|
default:
|
|
3327
3374
|
const parsedBody = parsedOutput.body;
|
|
3375
|
+
const $metadata = deserializeMetadata(output);
|
|
3376
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3328
3377
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
3329
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3378
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3330
3379
|
$fault: "client",
|
|
3331
|
-
$metadata
|
|
3380
|
+
$metadata,
|
|
3332
3381
|
});
|
|
3333
3382
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3334
3383
|
}
|
|
@@ -3353,8 +3402,7 @@ const deserializeAws_json1_1StartProjectVersionCommandError = async (output, con
|
|
|
3353
3402
|
body: await parseBody(output.body, context),
|
|
3354
3403
|
};
|
|
3355
3404
|
let response;
|
|
3356
|
-
|
|
3357
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3405
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3358
3406
|
switch (errorCode) {
|
|
3359
3407
|
case "AccessDeniedException":
|
|
3360
3408
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -3382,10 +3430,12 @@ const deserializeAws_json1_1StartProjectVersionCommandError = async (output, con
|
|
|
3382
3430
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
3383
3431
|
default:
|
|
3384
3432
|
const parsedBody = parsedOutput.body;
|
|
3433
|
+
const $metadata = deserializeMetadata(output);
|
|
3434
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3385
3435
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
3386
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3436
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3387
3437
|
$fault: "client",
|
|
3388
|
-
$metadata
|
|
3438
|
+
$metadata,
|
|
3389
3439
|
});
|
|
3390
3440
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3391
3441
|
}
|
|
@@ -3410,8 +3460,7 @@ const deserializeAws_json1_1StartSegmentDetectionCommandError = async (output, c
|
|
|
3410
3460
|
body: await parseBody(output.body, context),
|
|
3411
3461
|
};
|
|
3412
3462
|
let response;
|
|
3413
|
-
|
|
3414
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3463
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3415
3464
|
switch (errorCode) {
|
|
3416
3465
|
case "AccessDeniedException":
|
|
3417
3466
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -3442,10 +3491,12 @@ const deserializeAws_json1_1StartSegmentDetectionCommandError = async (output, c
|
|
|
3442
3491
|
throw await deserializeAws_json1_1VideoTooLargeExceptionResponse(parsedOutput, context);
|
|
3443
3492
|
default:
|
|
3444
3493
|
const parsedBody = parsedOutput.body;
|
|
3494
|
+
const $metadata = deserializeMetadata(output);
|
|
3495
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3445
3496
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
3446
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3497
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3447
3498
|
$fault: "client",
|
|
3448
|
-
$metadata
|
|
3499
|
+
$metadata,
|
|
3449
3500
|
});
|
|
3450
3501
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3451
3502
|
}
|
|
@@ -3470,8 +3521,7 @@ const deserializeAws_json1_1StartStreamProcessorCommandError = async (output, co
|
|
|
3470
3521
|
body: await parseBody(output.body, context),
|
|
3471
3522
|
};
|
|
3472
3523
|
let response;
|
|
3473
|
-
|
|
3474
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3524
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3475
3525
|
switch (errorCode) {
|
|
3476
3526
|
case "AccessDeniedException":
|
|
3477
3527
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -3496,10 +3546,12 @@ const deserializeAws_json1_1StartStreamProcessorCommandError = async (output, co
|
|
|
3496
3546
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
3497
3547
|
default:
|
|
3498
3548
|
const parsedBody = parsedOutput.body;
|
|
3549
|
+
const $metadata = deserializeMetadata(output);
|
|
3550
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3499
3551
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
3500
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3552
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3501
3553
|
$fault: "client",
|
|
3502
|
-
$metadata
|
|
3554
|
+
$metadata,
|
|
3503
3555
|
});
|
|
3504
3556
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3505
3557
|
}
|
|
@@ -3524,8 +3576,7 @@ const deserializeAws_json1_1StartTextDetectionCommandError = async (output, cont
|
|
|
3524
3576
|
body: await parseBody(output.body, context),
|
|
3525
3577
|
};
|
|
3526
3578
|
let response;
|
|
3527
|
-
|
|
3528
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3579
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3529
3580
|
switch (errorCode) {
|
|
3530
3581
|
case "AccessDeniedException":
|
|
3531
3582
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -3556,10 +3607,12 @@ const deserializeAws_json1_1StartTextDetectionCommandError = async (output, cont
|
|
|
3556
3607
|
throw await deserializeAws_json1_1VideoTooLargeExceptionResponse(parsedOutput, context);
|
|
3557
3608
|
default:
|
|
3558
3609
|
const parsedBody = parsedOutput.body;
|
|
3610
|
+
const $metadata = deserializeMetadata(output);
|
|
3611
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3559
3612
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
3560
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3613
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3561
3614
|
$fault: "client",
|
|
3562
|
-
$metadata
|
|
3615
|
+
$metadata,
|
|
3563
3616
|
});
|
|
3564
3617
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3565
3618
|
}
|
|
@@ -3584,8 +3637,7 @@ const deserializeAws_json1_1StopProjectVersionCommandError = async (output, cont
|
|
|
3584
3637
|
body: await parseBody(output.body, context),
|
|
3585
3638
|
};
|
|
3586
3639
|
let response;
|
|
3587
|
-
|
|
3588
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3640
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3589
3641
|
switch (errorCode) {
|
|
3590
3642
|
case "AccessDeniedException":
|
|
3591
3643
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -3610,10 +3662,12 @@ const deserializeAws_json1_1StopProjectVersionCommandError = async (output, cont
|
|
|
3610
3662
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
3611
3663
|
default:
|
|
3612
3664
|
const parsedBody = parsedOutput.body;
|
|
3665
|
+
const $metadata = deserializeMetadata(output);
|
|
3666
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3613
3667
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
3614
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3668
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3615
3669
|
$fault: "client",
|
|
3616
|
-
$metadata
|
|
3670
|
+
$metadata,
|
|
3617
3671
|
});
|
|
3618
3672
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3619
3673
|
}
|
|
@@ -3638,8 +3692,7 @@ const deserializeAws_json1_1StopStreamProcessorCommandError = async (output, con
|
|
|
3638
3692
|
body: await parseBody(output.body, context),
|
|
3639
3693
|
};
|
|
3640
3694
|
let response;
|
|
3641
|
-
|
|
3642
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3695
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3643
3696
|
switch (errorCode) {
|
|
3644
3697
|
case "AccessDeniedException":
|
|
3645
3698
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -3664,10 +3717,12 @@ const deserializeAws_json1_1StopStreamProcessorCommandError = async (output, con
|
|
|
3664
3717
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
3665
3718
|
default:
|
|
3666
3719
|
const parsedBody = parsedOutput.body;
|
|
3720
|
+
const $metadata = deserializeMetadata(output);
|
|
3721
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3667
3722
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
3668
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3723
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3669
3724
|
$fault: "client",
|
|
3670
|
-
$metadata
|
|
3725
|
+
$metadata,
|
|
3671
3726
|
});
|
|
3672
3727
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3673
3728
|
}
|
|
@@ -3692,8 +3747,7 @@ const deserializeAws_json1_1TagResourceCommandError = async (output, context) =>
|
|
|
3692
3747
|
body: await parseBody(output.body, context),
|
|
3693
3748
|
};
|
|
3694
3749
|
let response;
|
|
3695
|
-
|
|
3696
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3750
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3697
3751
|
switch (errorCode) {
|
|
3698
3752
|
case "AccessDeniedException":
|
|
3699
3753
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -3718,10 +3772,12 @@ const deserializeAws_json1_1TagResourceCommandError = async (output, context) =>
|
|
|
3718
3772
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
3719
3773
|
default:
|
|
3720
3774
|
const parsedBody = parsedOutput.body;
|
|
3775
|
+
const $metadata = deserializeMetadata(output);
|
|
3776
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3721
3777
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
3722
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3778
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3723
3779
|
$fault: "client",
|
|
3724
|
-
$metadata
|
|
3780
|
+
$metadata,
|
|
3725
3781
|
});
|
|
3726
3782
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3727
3783
|
}
|
|
@@ -3746,8 +3802,7 @@ const deserializeAws_json1_1UntagResourceCommandError = async (output, context)
|
|
|
3746
3802
|
body: await parseBody(output.body, context),
|
|
3747
3803
|
};
|
|
3748
3804
|
let response;
|
|
3749
|
-
|
|
3750
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3805
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3751
3806
|
switch (errorCode) {
|
|
3752
3807
|
case "AccessDeniedException":
|
|
3753
3808
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -3769,10 +3824,12 @@ const deserializeAws_json1_1UntagResourceCommandError = async (output, context)
|
|
|
3769
3824
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
3770
3825
|
default:
|
|
3771
3826
|
const parsedBody = parsedOutput.body;
|
|
3827
|
+
const $metadata = deserializeMetadata(output);
|
|
3828
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3772
3829
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
3773
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3830
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3774
3831
|
$fault: "client",
|
|
3775
|
-
$metadata
|
|
3832
|
+
$metadata,
|
|
3776
3833
|
});
|
|
3777
3834
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3778
3835
|
}
|
|
@@ -3797,8 +3854,7 @@ const deserializeAws_json1_1UpdateDatasetEntriesCommandError = async (output, co
|
|
|
3797
3854
|
body: await parseBody(output.body, context),
|
|
3798
3855
|
};
|
|
3799
3856
|
let response;
|
|
3800
|
-
|
|
3801
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3857
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3802
3858
|
switch (errorCode) {
|
|
3803
3859
|
case "AccessDeniedException":
|
|
3804
3860
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -3826,10 +3882,12 @@ const deserializeAws_json1_1UpdateDatasetEntriesCommandError = async (output, co
|
|
|
3826
3882
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
3827
3883
|
default:
|
|
3828
3884
|
const parsedBody = parsedOutput.body;
|
|
3885
|
+
const $metadata = deserializeMetadata(output);
|
|
3886
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3829
3887
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
3830
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3888
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3831
3889
|
$fault: "client",
|
|
3832
|
-
$metadata
|
|
3890
|
+
$metadata,
|
|
3833
3891
|
});
|
|
3834
3892
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3835
3893
|
}
|
|
@@ -3854,8 +3912,7 @@ const deserializeAws_json1_1UpdateStreamProcessorCommandError = async (output, c
|
|
|
3854
3912
|
body: await parseBody(output.body, context),
|
|
3855
3913
|
};
|
|
3856
3914
|
let response;
|
|
3857
|
-
|
|
3858
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3915
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3859
3916
|
switch (errorCode) {
|
|
3860
3917
|
case "AccessDeniedException":
|
|
3861
3918
|
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
@@ -3877,10 +3934,12 @@ const deserializeAws_json1_1UpdateStreamProcessorCommandError = async (output, c
|
|
|
3877
3934
|
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
3878
3935
|
default:
|
|
3879
3936
|
const parsedBody = parsedOutput.body;
|
|
3937
|
+
const $metadata = deserializeMetadata(output);
|
|
3938
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3880
3939
|
response = new RekognitionServiceException_1.RekognitionServiceException({
|
|
3881
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3940
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3882
3941
|
$fault: "client",
|
|
3883
|
-
$metadata
|
|
3942
|
+
$metadata,
|
|
3884
3943
|
});
|
|
3885
3944
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3886
3945
|
}
|
|
@@ -7038,5 +7097,4 @@ const loadRestJsonErrorCode = (output, data) => {
|
|
|
7038
7097
|
if (data["__type"] !== undefined) {
|
|
7039
7098
|
return sanitizeErrorCode(data["__type"]);
|
|
7040
7099
|
}
|
|
7041
|
-
return "";
|
|
7042
7100
|
};
|