@aws-sdk/client-ssm-incidents 3.118.1 → 3.121.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist-cjs/protocols/Aws_restJson1.js +145 -117
- package/dist-es/protocols/Aws_restJson1.js +145 -117
- package/package.json +3 -3
|
@@ -776,8 +776,7 @@ const deserializeAws_restJson1CreateReplicationSetCommandError = async (output,
|
|
|
776
776
|
body: await parseBody(output.body, context),
|
|
777
777
|
};
|
|
778
778
|
let response;
|
|
779
|
-
|
|
780
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
779
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
781
780
|
switch (errorCode) {
|
|
782
781
|
case "AccessDeniedException":
|
|
783
782
|
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
@@ -799,10 +798,12 @@ const deserializeAws_restJson1CreateReplicationSetCommandError = async (output,
|
|
|
799
798
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
800
799
|
default:
|
|
801
800
|
const parsedBody = parsedOutput.body;
|
|
801
|
+
const $metadata = deserializeMetadata(output);
|
|
802
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
802
803
|
response = new SSMIncidentsServiceException_1.SSMIncidentsServiceException({
|
|
803
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
804
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
804
805
|
$fault: "client",
|
|
805
|
-
$metadata
|
|
806
|
+
$metadata,
|
|
806
807
|
});
|
|
807
808
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
808
809
|
}
|
|
@@ -828,8 +829,7 @@ const deserializeAws_restJson1CreateResponsePlanCommandError = async (output, co
|
|
|
828
829
|
body: await parseBody(output.body, context),
|
|
829
830
|
};
|
|
830
831
|
let response;
|
|
831
|
-
|
|
832
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
832
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
833
833
|
switch (errorCode) {
|
|
834
834
|
case "AccessDeniedException":
|
|
835
835
|
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
@@ -851,10 +851,12 @@ const deserializeAws_restJson1CreateResponsePlanCommandError = async (output, co
|
|
|
851
851
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
852
852
|
default:
|
|
853
853
|
const parsedBody = parsedOutput.body;
|
|
854
|
+
const $metadata = deserializeMetadata(output);
|
|
855
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
854
856
|
response = new SSMIncidentsServiceException_1.SSMIncidentsServiceException({
|
|
855
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
857
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
856
858
|
$fault: "client",
|
|
857
|
-
$metadata
|
|
859
|
+
$metadata,
|
|
858
860
|
});
|
|
859
861
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
860
862
|
}
|
|
@@ -884,8 +886,7 @@ const deserializeAws_restJson1CreateTimelineEventCommandError = async (output, c
|
|
|
884
886
|
body: await parseBody(output.body, context),
|
|
885
887
|
};
|
|
886
888
|
let response;
|
|
887
|
-
|
|
888
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
889
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
889
890
|
switch (errorCode) {
|
|
890
891
|
case "AccessDeniedException":
|
|
891
892
|
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
@@ -907,10 +908,12 @@ const deserializeAws_restJson1CreateTimelineEventCommandError = async (output, c
|
|
|
907
908
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
908
909
|
default:
|
|
909
910
|
const parsedBody = parsedOutput.body;
|
|
911
|
+
const $metadata = deserializeMetadata(output);
|
|
912
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
910
913
|
response = new SSMIncidentsServiceException_1.SSMIncidentsServiceException({
|
|
911
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
914
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
912
915
|
$fault: "client",
|
|
913
|
-
$metadata
|
|
916
|
+
$metadata,
|
|
914
917
|
});
|
|
915
918
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
916
919
|
}
|
|
@@ -932,8 +935,7 @@ const deserializeAws_restJson1DeleteIncidentRecordCommandError = async (output,
|
|
|
932
935
|
body: await parseBody(output.body, context),
|
|
933
936
|
};
|
|
934
937
|
let response;
|
|
935
|
-
|
|
936
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
938
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
937
939
|
switch (errorCode) {
|
|
938
940
|
case "AccessDeniedException":
|
|
939
941
|
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
@@ -949,10 +951,12 @@ const deserializeAws_restJson1DeleteIncidentRecordCommandError = async (output,
|
|
|
949
951
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
950
952
|
default:
|
|
951
953
|
const parsedBody = parsedOutput.body;
|
|
954
|
+
const $metadata = deserializeMetadata(output);
|
|
955
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
952
956
|
response = new SSMIncidentsServiceException_1.SSMIncidentsServiceException({
|
|
953
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
957
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
954
958
|
$fault: "client",
|
|
955
|
-
$metadata
|
|
959
|
+
$metadata,
|
|
956
960
|
});
|
|
957
961
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
958
962
|
}
|
|
@@ -974,8 +978,7 @@ const deserializeAws_restJson1DeleteReplicationSetCommandError = async (output,
|
|
|
974
978
|
body: await parseBody(output.body, context),
|
|
975
979
|
};
|
|
976
980
|
let response;
|
|
977
|
-
|
|
978
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
981
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
979
982
|
switch (errorCode) {
|
|
980
983
|
case "AccessDeniedException":
|
|
981
984
|
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
@@ -994,10 +997,12 @@ const deserializeAws_restJson1DeleteReplicationSetCommandError = async (output,
|
|
|
994
997
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
995
998
|
default:
|
|
996
999
|
const parsedBody = parsedOutput.body;
|
|
1000
|
+
const $metadata = deserializeMetadata(output);
|
|
1001
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
997
1002
|
response = new SSMIncidentsServiceException_1.SSMIncidentsServiceException({
|
|
998
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1003
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
999
1004
|
$fault: "client",
|
|
1000
|
-
$metadata
|
|
1005
|
+
$metadata,
|
|
1001
1006
|
});
|
|
1002
1007
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1003
1008
|
}
|
|
@@ -1019,8 +1024,7 @@ const deserializeAws_restJson1DeleteResourcePolicyCommandError = async (output,
|
|
|
1019
1024
|
body: await parseBody(output.body, context),
|
|
1020
1025
|
};
|
|
1021
1026
|
let response;
|
|
1022
|
-
|
|
1023
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1027
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1024
1028
|
switch (errorCode) {
|
|
1025
1029
|
case "AccessDeniedException":
|
|
1026
1030
|
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
@@ -1039,10 +1043,12 @@ const deserializeAws_restJson1DeleteResourcePolicyCommandError = async (output,
|
|
|
1039
1043
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1040
1044
|
default:
|
|
1041
1045
|
const parsedBody = parsedOutput.body;
|
|
1046
|
+
const $metadata = deserializeMetadata(output);
|
|
1047
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1042
1048
|
response = new SSMIncidentsServiceException_1.SSMIncidentsServiceException({
|
|
1043
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1049
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1044
1050
|
$fault: "client",
|
|
1045
|
-
$metadata
|
|
1051
|
+
$metadata,
|
|
1046
1052
|
});
|
|
1047
1053
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1048
1054
|
}
|
|
@@ -1064,8 +1070,7 @@ const deserializeAws_restJson1DeleteResponsePlanCommandError = async (output, co
|
|
|
1064
1070
|
body: await parseBody(output.body, context),
|
|
1065
1071
|
};
|
|
1066
1072
|
let response;
|
|
1067
|
-
|
|
1068
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1073
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1069
1074
|
switch (errorCode) {
|
|
1070
1075
|
case "AccessDeniedException":
|
|
1071
1076
|
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
@@ -1081,10 +1086,12 @@ const deserializeAws_restJson1DeleteResponsePlanCommandError = async (output, co
|
|
|
1081
1086
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1082
1087
|
default:
|
|
1083
1088
|
const parsedBody = parsedOutput.body;
|
|
1089
|
+
const $metadata = deserializeMetadata(output);
|
|
1090
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1084
1091
|
response = new SSMIncidentsServiceException_1.SSMIncidentsServiceException({
|
|
1085
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1092
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1086
1093
|
$fault: "client",
|
|
1087
|
-
$metadata
|
|
1094
|
+
$metadata,
|
|
1088
1095
|
});
|
|
1089
1096
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1090
1097
|
}
|
|
@@ -1106,8 +1113,7 @@ const deserializeAws_restJson1DeleteTimelineEventCommandError = async (output, c
|
|
|
1106
1113
|
body: await parseBody(output.body, context),
|
|
1107
1114
|
};
|
|
1108
1115
|
let response;
|
|
1109
|
-
|
|
1110
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1116
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1111
1117
|
switch (errorCode) {
|
|
1112
1118
|
case "AccessDeniedException":
|
|
1113
1119
|
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
@@ -1123,10 +1129,12 @@ const deserializeAws_restJson1DeleteTimelineEventCommandError = async (output, c
|
|
|
1123
1129
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1124
1130
|
default:
|
|
1125
1131
|
const parsedBody = parsedOutput.body;
|
|
1132
|
+
const $metadata = deserializeMetadata(output);
|
|
1133
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1126
1134
|
response = new SSMIncidentsServiceException_1.SSMIncidentsServiceException({
|
|
1127
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1135
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1128
1136
|
$fault: "client",
|
|
1129
|
-
$metadata
|
|
1137
|
+
$metadata,
|
|
1130
1138
|
});
|
|
1131
1139
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1132
1140
|
}
|
|
@@ -1152,8 +1160,7 @@ const deserializeAws_restJson1GetIncidentRecordCommandError = async (output, con
|
|
|
1152
1160
|
body: await parseBody(output.body, context),
|
|
1153
1161
|
};
|
|
1154
1162
|
let response;
|
|
1155
|
-
|
|
1156
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1163
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1157
1164
|
switch (errorCode) {
|
|
1158
1165
|
case "AccessDeniedException":
|
|
1159
1166
|
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
@@ -1172,10 +1179,12 @@ const deserializeAws_restJson1GetIncidentRecordCommandError = async (output, con
|
|
|
1172
1179
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1173
1180
|
default:
|
|
1174
1181
|
const parsedBody = parsedOutput.body;
|
|
1182
|
+
const $metadata = deserializeMetadata(output);
|
|
1183
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1175
1184
|
response = new SSMIncidentsServiceException_1.SSMIncidentsServiceException({
|
|
1176
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1185
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1177
1186
|
$fault: "client",
|
|
1178
|
-
$metadata
|
|
1187
|
+
$metadata,
|
|
1179
1188
|
});
|
|
1180
1189
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1181
1190
|
}
|
|
@@ -1201,8 +1210,7 @@ const deserializeAws_restJson1GetReplicationSetCommandError = async (output, con
|
|
|
1201
1210
|
body: await parseBody(output.body, context),
|
|
1202
1211
|
};
|
|
1203
1212
|
let response;
|
|
1204
|
-
|
|
1205
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1213
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1206
1214
|
switch (errorCode) {
|
|
1207
1215
|
case "AccessDeniedException":
|
|
1208
1216
|
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
@@ -1221,10 +1229,12 @@ const deserializeAws_restJson1GetReplicationSetCommandError = async (output, con
|
|
|
1221
1229
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1222
1230
|
default:
|
|
1223
1231
|
const parsedBody = parsedOutput.body;
|
|
1232
|
+
const $metadata = deserializeMetadata(output);
|
|
1233
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1224
1234
|
response = new SSMIncidentsServiceException_1.SSMIncidentsServiceException({
|
|
1225
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1235
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1226
1236
|
$fault: "client",
|
|
1227
|
-
$metadata
|
|
1237
|
+
$metadata,
|
|
1228
1238
|
});
|
|
1229
1239
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1230
1240
|
}
|
|
@@ -1254,8 +1264,7 @@ const deserializeAws_restJson1GetResourcePoliciesCommandError = async (output, c
|
|
|
1254
1264
|
body: await parseBody(output.body, context),
|
|
1255
1265
|
};
|
|
1256
1266
|
let response;
|
|
1257
|
-
|
|
1258
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1267
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1259
1268
|
switch (errorCode) {
|
|
1260
1269
|
case "AccessDeniedException":
|
|
1261
1270
|
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
@@ -1274,10 +1283,12 @@ const deserializeAws_restJson1GetResourcePoliciesCommandError = async (output, c
|
|
|
1274
1283
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1275
1284
|
default:
|
|
1276
1285
|
const parsedBody = parsedOutput.body;
|
|
1286
|
+
const $metadata = deserializeMetadata(output);
|
|
1287
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1277
1288
|
response = new SSMIncidentsServiceException_1.SSMIncidentsServiceException({
|
|
1278
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1289
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1279
1290
|
$fault: "client",
|
|
1280
|
-
$metadata
|
|
1291
|
+
$metadata,
|
|
1281
1292
|
});
|
|
1282
1293
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1283
1294
|
}
|
|
@@ -1327,8 +1338,7 @@ const deserializeAws_restJson1GetResponsePlanCommandError = async (output, conte
|
|
|
1327
1338
|
body: await parseBody(output.body, context),
|
|
1328
1339
|
};
|
|
1329
1340
|
let response;
|
|
1330
|
-
|
|
1331
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1341
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1332
1342
|
switch (errorCode) {
|
|
1333
1343
|
case "AccessDeniedException":
|
|
1334
1344
|
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
@@ -1347,10 +1357,12 @@ const deserializeAws_restJson1GetResponsePlanCommandError = async (output, conte
|
|
|
1347
1357
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1348
1358
|
default:
|
|
1349
1359
|
const parsedBody = parsedOutput.body;
|
|
1360
|
+
const $metadata = deserializeMetadata(output);
|
|
1361
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1350
1362
|
response = new SSMIncidentsServiceException_1.SSMIncidentsServiceException({
|
|
1351
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1363
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1352
1364
|
$fault: "client",
|
|
1353
|
-
$metadata
|
|
1365
|
+
$metadata,
|
|
1354
1366
|
});
|
|
1355
1367
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1356
1368
|
}
|
|
@@ -1376,8 +1388,7 @@ const deserializeAws_restJson1GetTimelineEventCommandError = async (output, cont
|
|
|
1376
1388
|
body: await parseBody(output.body, context),
|
|
1377
1389
|
};
|
|
1378
1390
|
let response;
|
|
1379
|
-
|
|
1380
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1391
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1381
1392
|
switch (errorCode) {
|
|
1382
1393
|
case "AccessDeniedException":
|
|
1383
1394
|
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
@@ -1396,10 +1407,12 @@ const deserializeAws_restJson1GetTimelineEventCommandError = async (output, cont
|
|
|
1396
1407
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1397
1408
|
default:
|
|
1398
1409
|
const parsedBody = parsedOutput.body;
|
|
1410
|
+
const $metadata = deserializeMetadata(output);
|
|
1411
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1399
1412
|
response = new SSMIncidentsServiceException_1.SSMIncidentsServiceException({
|
|
1400
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1413
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1401
1414
|
$fault: "client",
|
|
1402
|
-
$metadata
|
|
1415
|
+
$metadata,
|
|
1403
1416
|
});
|
|
1404
1417
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1405
1418
|
}
|
|
@@ -1429,8 +1442,7 @@ const deserializeAws_restJson1ListIncidentRecordsCommandError = async (output, c
|
|
|
1429
1442
|
body: await parseBody(output.body, context),
|
|
1430
1443
|
};
|
|
1431
1444
|
let response;
|
|
1432
|
-
|
|
1433
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1445
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1434
1446
|
switch (errorCode) {
|
|
1435
1447
|
case "AccessDeniedException":
|
|
1436
1448
|
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
@@ -1446,10 +1458,12 @@ const deserializeAws_restJson1ListIncidentRecordsCommandError = async (output, c
|
|
|
1446
1458
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1447
1459
|
default:
|
|
1448
1460
|
const parsedBody = parsedOutput.body;
|
|
1461
|
+
const $metadata = deserializeMetadata(output);
|
|
1462
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1449
1463
|
response = new SSMIncidentsServiceException_1.SSMIncidentsServiceException({
|
|
1450
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1464
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1451
1465
|
$fault: "client",
|
|
1452
|
-
$metadata
|
|
1466
|
+
$metadata,
|
|
1453
1467
|
});
|
|
1454
1468
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1455
1469
|
}
|
|
@@ -1479,8 +1493,7 @@ const deserializeAws_restJson1ListRelatedItemsCommandError = async (output, cont
|
|
|
1479
1493
|
body: await parseBody(output.body, context),
|
|
1480
1494
|
};
|
|
1481
1495
|
let response;
|
|
1482
|
-
|
|
1483
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1496
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1484
1497
|
switch (errorCode) {
|
|
1485
1498
|
case "AccessDeniedException":
|
|
1486
1499
|
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
@@ -1496,10 +1509,12 @@ const deserializeAws_restJson1ListRelatedItemsCommandError = async (output, cont
|
|
|
1496
1509
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1497
1510
|
default:
|
|
1498
1511
|
const parsedBody = parsedOutput.body;
|
|
1512
|
+
const $metadata = deserializeMetadata(output);
|
|
1513
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1499
1514
|
response = new SSMIncidentsServiceException_1.SSMIncidentsServiceException({
|
|
1500
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1515
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1501
1516
|
$fault: "client",
|
|
1502
|
-
$metadata
|
|
1517
|
+
$metadata,
|
|
1503
1518
|
});
|
|
1504
1519
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1505
1520
|
}
|
|
@@ -1529,8 +1544,7 @@ const deserializeAws_restJson1ListReplicationSetsCommandError = async (output, c
|
|
|
1529
1544
|
body: await parseBody(output.body, context),
|
|
1530
1545
|
};
|
|
1531
1546
|
let response;
|
|
1532
|
-
|
|
1533
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1547
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1534
1548
|
switch (errorCode) {
|
|
1535
1549
|
case "AccessDeniedException":
|
|
1536
1550
|
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
@@ -1546,10 +1560,12 @@ const deserializeAws_restJson1ListReplicationSetsCommandError = async (output, c
|
|
|
1546
1560
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1547
1561
|
default:
|
|
1548
1562
|
const parsedBody = parsedOutput.body;
|
|
1563
|
+
const $metadata = deserializeMetadata(output);
|
|
1564
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1549
1565
|
response = new SSMIncidentsServiceException_1.SSMIncidentsServiceException({
|
|
1550
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1566
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1551
1567
|
$fault: "client",
|
|
1552
|
-
$metadata
|
|
1568
|
+
$metadata,
|
|
1553
1569
|
});
|
|
1554
1570
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1555
1571
|
}
|
|
@@ -1579,8 +1595,7 @@ const deserializeAws_restJson1ListResponsePlansCommandError = async (output, con
|
|
|
1579
1595
|
body: await parseBody(output.body, context),
|
|
1580
1596
|
};
|
|
1581
1597
|
let response;
|
|
1582
|
-
|
|
1583
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1598
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1584
1599
|
switch (errorCode) {
|
|
1585
1600
|
case "AccessDeniedException":
|
|
1586
1601
|
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
@@ -1596,10 +1611,12 @@ const deserializeAws_restJson1ListResponsePlansCommandError = async (output, con
|
|
|
1596
1611
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1597
1612
|
default:
|
|
1598
1613
|
const parsedBody = parsedOutput.body;
|
|
1614
|
+
const $metadata = deserializeMetadata(output);
|
|
1615
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1599
1616
|
response = new SSMIncidentsServiceException_1.SSMIncidentsServiceException({
|
|
1600
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1617
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1601
1618
|
$fault: "client",
|
|
1602
|
-
$metadata
|
|
1619
|
+
$metadata,
|
|
1603
1620
|
});
|
|
1604
1621
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1605
1622
|
}
|
|
@@ -1625,8 +1642,7 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
1625
1642
|
body: await parseBody(output.body, context),
|
|
1626
1643
|
};
|
|
1627
1644
|
let response;
|
|
1628
|
-
|
|
1629
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1645
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1630
1646
|
switch (errorCode) {
|
|
1631
1647
|
case "AccessDeniedException":
|
|
1632
1648
|
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
@@ -1645,10 +1661,12 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
1645
1661
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1646
1662
|
default:
|
|
1647
1663
|
const parsedBody = parsedOutput.body;
|
|
1664
|
+
const $metadata = deserializeMetadata(output);
|
|
1665
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1648
1666
|
response = new SSMIncidentsServiceException_1.SSMIncidentsServiceException({
|
|
1649
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1667
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1650
1668
|
$fault: "client",
|
|
1651
|
-
$metadata
|
|
1669
|
+
$metadata,
|
|
1652
1670
|
});
|
|
1653
1671
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1654
1672
|
}
|
|
@@ -1678,8 +1696,7 @@ const deserializeAws_restJson1ListTimelineEventsCommandError = async (output, co
|
|
|
1678
1696
|
body: await parseBody(output.body, context),
|
|
1679
1697
|
};
|
|
1680
1698
|
let response;
|
|
1681
|
-
|
|
1682
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1699
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1683
1700
|
switch (errorCode) {
|
|
1684
1701
|
case "AccessDeniedException":
|
|
1685
1702
|
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
@@ -1695,10 +1712,12 @@ const deserializeAws_restJson1ListTimelineEventsCommandError = async (output, co
|
|
|
1695
1712
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1696
1713
|
default:
|
|
1697
1714
|
const parsedBody = parsedOutput.body;
|
|
1715
|
+
const $metadata = deserializeMetadata(output);
|
|
1716
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1698
1717
|
response = new SSMIncidentsServiceException_1.SSMIncidentsServiceException({
|
|
1699
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1718
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1700
1719
|
$fault: "client",
|
|
1701
|
-
$metadata
|
|
1720
|
+
$metadata,
|
|
1702
1721
|
});
|
|
1703
1722
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1704
1723
|
}
|
|
@@ -1724,8 +1743,7 @@ const deserializeAws_restJson1PutResourcePolicyCommandError = async (output, con
|
|
|
1724
1743
|
body: await parseBody(output.body, context),
|
|
1725
1744
|
};
|
|
1726
1745
|
let response;
|
|
1727
|
-
|
|
1728
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1746
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1729
1747
|
switch (errorCode) {
|
|
1730
1748
|
case "AccessDeniedException":
|
|
1731
1749
|
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
@@ -1744,10 +1762,12 @@ const deserializeAws_restJson1PutResourcePolicyCommandError = async (output, con
|
|
|
1744
1762
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1745
1763
|
default:
|
|
1746
1764
|
const parsedBody = parsedOutput.body;
|
|
1765
|
+
const $metadata = deserializeMetadata(output);
|
|
1766
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1747
1767
|
response = new SSMIncidentsServiceException_1.SSMIncidentsServiceException({
|
|
1748
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1768
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1749
1769
|
$fault: "client",
|
|
1750
|
-
$metadata
|
|
1770
|
+
$metadata,
|
|
1751
1771
|
});
|
|
1752
1772
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1753
1773
|
}
|
|
@@ -1773,8 +1793,7 @@ const deserializeAws_restJson1StartIncidentCommandError = async (output, context
|
|
|
1773
1793
|
body: await parseBody(output.body, context),
|
|
1774
1794
|
};
|
|
1775
1795
|
let response;
|
|
1776
|
-
|
|
1777
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1796
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1778
1797
|
switch (errorCode) {
|
|
1779
1798
|
case "AccessDeniedException":
|
|
1780
1799
|
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
@@ -1796,10 +1815,12 @@ const deserializeAws_restJson1StartIncidentCommandError = async (output, context
|
|
|
1796
1815
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1797
1816
|
default:
|
|
1798
1817
|
const parsedBody = parsedOutput.body;
|
|
1818
|
+
const $metadata = deserializeMetadata(output);
|
|
1819
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1799
1820
|
response = new SSMIncidentsServiceException_1.SSMIncidentsServiceException({
|
|
1800
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1821
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1801
1822
|
$fault: "client",
|
|
1802
|
-
$metadata
|
|
1823
|
+
$metadata,
|
|
1803
1824
|
});
|
|
1804
1825
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1805
1826
|
}
|
|
@@ -1821,8 +1842,7 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
1821
1842
|
body: await parseBody(output.body, context),
|
|
1822
1843
|
};
|
|
1823
1844
|
let response;
|
|
1824
|
-
|
|
1825
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1845
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1826
1846
|
switch (errorCode) {
|
|
1827
1847
|
case "AccessDeniedException":
|
|
1828
1848
|
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
@@ -1847,10 +1867,12 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
1847
1867
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1848
1868
|
default:
|
|
1849
1869
|
const parsedBody = parsedOutput.body;
|
|
1870
|
+
const $metadata = deserializeMetadata(output);
|
|
1871
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1850
1872
|
response = new SSMIncidentsServiceException_1.SSMIncidentsServiceException({
|
|
1851
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1873
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1852
1874
|
$fault: "client",
|
|
1853
|
-
$metadata
|
|
1875
|
+
$metadata,
|
|
1854
1876
|
});
|
|
1855
1877
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1856
1878
|
}
|
|
@@ -1872,8 +1894,7 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
1872
1894
|
body: await parseBody(output.body, context),
|
|
1873
1895
|
};
|
|
1874
1896
|
let response;
|
|
1875
|
-
|
|
1876
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1897
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1877
1898
|
switch (errorCode) {
|
|
1878
1899
|
case "AccessDeniedException":
|
|
1879
1900
|
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
@@ -1895,10 +1916,12 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
1895
1916
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1896
1917
|
default:
|
|
1897
1918
|
const parsedBody = parsedOutput.body;
|
|
1919
|
+
const $metadata = deserializeMetadata(output);
|
|
1920
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1898
1921
|
response = new SSMIncidentsServiceException_1.SSMIncidentsServiceException({
|
|
1899
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1922
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1900
1923
|
$fault: "client",
|
|
1901
|
-
$metadata
|
|
1924
|
+
$metadata,
|
|
1902
1925
|
});
|
|
1903
1926
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1904
1927
|
}
|
|
@@ -1920,8 +1943,7 @@ const deserializeAws_restJson1UpdateDeletionProtectionCommandError = async (outp
|
|
|
1920
1943
|
body: await parseBody(output.body, context),
|
|
1921
1944
|
};
|
|
1922
1945
|
let response;
|
|
1923
|
-
|
|
1924
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1946
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1925
1947
|
switch (errorCode) {
|
|
1926
1948
|
case "AccessDeniedException":
|
|
1927
1949
|
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
@@ -1940,10 +1962,12 @@ const deserializeAws_restJson1UpdateDeletionProtectionCommandError = async (outp
|
|
|
1940
1962
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1941
1963
|
default:
|
|
1942
1964
|
const parsedBody = parsedOutput.body;
|
|
1965
|
+
const $metadata = deserializeMetadata(output);
|
|
1966
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1943
1967
|
response = new SSMIncidentsServiceException_1.SSMIncidentsServiceException({
|
|
1944
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1968
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1945
1969
|
$fault: "client",
|
|
1946
|
-
$metadata
|
|
1970
|
+
$metadata,
|
|
1947
1971
|
});
|
|
1948
1972
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1949
1973
|
}
|
|
@@ -1965,8 +1989,7 @@ const deserializeAws_restJson1UpdateIncidentRecordCommandError = async (output,
|
|
|
1965
1989
|
body: await parseBody(output.body, context),
|
|
1966
1990
|
};
|
|
1967
1991
|
let response;
|
|
1968
|
-
|
|
1969
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1992
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1970
1993
|
switch (errorCode) {
|
|
1971
1994
|
case "AccessDeniedException":
|
|
1972
1995
|
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
@@ -1988,10 +2011,12 @@ const deserializeAws_restJson1UpdateIncidentRecordCommandError = async (output,
|
|
|
1988
2011
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1989
2012
|
default:
|
|
1990
2013
|
const parsedBody = parsedOutput.body;
|
|
2014
|
+
const $metadata = deserializeMetadata(output);
|
|
2015
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1991
2016
|
response = new SSMIncidentsServiceException_1.SSMIncidentsServiceException({
|
|
1992
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2017
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1993
2018
|
$fault: "client",
|
|
1994
|
-
$metadata
|
|
2019
|
+
$metadata,
|
|
1995
2020
|
});
|
|
1996
2021
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1997
2022
|
}
|
|
@@ -2013,8 +2038,7 @@ const deserializeAws_restJson1UpdateRelatedItemsCommandError = async (output, co
|
|
|
2013
2038
|
body: await parseBody(output.body, context),
|
|
2014
2039
|
};
|
|
2015
2040
|
let response;
|
|
2016
|
-
|
|
2017
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2041
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2018
2042
|
switch (errorCode) {
|
|
2019
2043
|
case "AccessDeniedException":
|
|
2020
2044
|
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
@@ -2036,10 +2060,12 @@ const deserializeAws_restJson1UpdateRelatedItemsCommandError = async (output, co
|
|
|
2036
2060
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2037
2061
|
default:
|
|
2038
2062
|
const parsedBody = parsedOutput.body;
|
|
2063
|
+
const $metadata = deserializeMetadata(output);
|
|
2064
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2039
2065
|
response = new SSMIncidentsServiceException_1.SSMIncidentsServiceException({
|
|
2040
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2066
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2041
2067
|
$fault: "client",
|
|
2042
|
-
$metadata
|
|
2068
|
+
$metadata,
|
|
2043
2069
|
});
|
|
2044
2070
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2045
2071
|
}
|
|
@@ -2061,8 +2087,7 @@ const deserializeAws_restJson1UpdateReplicationSetCommandError = async (output,
|
|
|
2061
2087
|
body: await parseBody(output.body, context),
|
|
2062
2088
|
};
|
|
2063
2089
|
let response;
|
|
2064
|
-
|
|
2065
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2090
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2066
2091
|
switch (errorCode) {
|
|
2067
2092
|
case "AccessDeniedException":
|
|
2068
2093
|
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
@@ -2084,10 +2109,12 @@ const deserializeAws_restJson1UpdateReplicationSetCommandError = async (output,
|
|
|
2084
2109
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2085
2110
|
default:
|
|
2086
2111
|
const parsedBody = parsedOutput.body;
|
|
2112
|
+
const $metadata = deserializeMetadata(output);
|
|
2113
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2087
2114
|
response = new SSMIncidentsServiceException_1.SSMIncidentsServiceException({
|
|
2088
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2115
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2089
2116
|
$fault: "client",
|
|
2090
|
-
$metadata
|
|
2117
|
+
$metadata,
|
|
2091
2118
|
});
|
|
2092
2119
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2093
2120
|
}
|
|
@@ -2109,8 +2136,7 @@ const deserializeAws_restJson1UpdateResponsePlanCommandError = async (output, co
|
|
|
2109
2136
|
body: await parseBody(output.body, context),
|
|
2110
2137
|
};
|
|
2111
2138
|
let response;
|
|
2112
|
-
|
|
2113
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2139
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2114
2140
|
switch (errorCode) {
|
|
2115
2141
|
case "AccessDeniedException":
|
|
2116
2142
|
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
@@ -2132,10 +2158,12 @@ const deserializeAws_restJson1UpdateResponsePlanCommandError = async (output, co
|
|
|
2132
2158
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2133
2159
|
default:
|
|
2134
2160
|
const parsedBody = parsedOutput.body;
|
|
2161
|
+
const $metadata = deserializeMetadata(output);
|
|
2162
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2135
2163
|
response = new SSMIncidentsServiceException_1.SSMIncidentsServiceException({
|
|
2136
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2164
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2137
2165
|
$fault: "client",
|
|
2138
|
-
$metadata
|
|
2166
|
+
$metadata,
|
|
2139
2167
|
});
|
|
2140
2168
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2141
2169
|
}
|
|
@@ -2157,8 +2185,7 @@ const deserializeAws_restJson1UpdateTimelineEventCommandError = async (output, c
|
|
|
2157
2185
|
body: await parseBody(output.body, context),
|
|
2158
2186
|
};
|
|
2159
2187
|
let response;
|
|
2160
|
-
|
|
2161
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2188
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2162
2189
|
switch (errorCode) {
|
|
2163
2190
|
case "AccessDeniedException":
|
|
2164
2191
|
case "com.amazonaws.ssmincidents#AccessDeniedException":
|
|
@@ -2180,10 +2207,12 @@ const deserializeAws_restJson1UpdateTimelineEventCommandError = async (output, c
|
|
|
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 SSMIncidentsServiceException_1.SSMIncidentsServiceException({
|
|
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
|
}
|
|
@@ -3033,5 +3062,4 @@ const loadRestJsonErrorCode = (output, data) => {
|
|
|
3033
3062
|
if (data["__type"] !== undefined) {
|
|
3034
3063
|
return sanitizeErrorCode(data["__type"]);
|
|
3035
3064
|
}
|
|
3036
|
-
return "";
|
|
3037
3065
|
};
|