@aws-sdk/client-outposts 3.114.0 → 3.121.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/dist-cjs/protocols/Aws_restJson1.js +130 -105
- package/dist-es/protocols/Aws_restJson1.js +130 -105
- package/package.json +6 -6
|
@@ -789,8 +789,7 @@ const deserializeAws_restJson1CancelOrderCommandError = async (output, context)
|
|
|
789
789
|
body: await parseBody(output.body, context),
|
|
790
790
|
};
|
|
791
791
|
let response;
|
|
792
|
-
|
|
793
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
792
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
794
793
|
switch (errorCode) {
|
|
795
794
|
case "AccessDeniedException":
|
|
796
795
|
case "com.amazonaws.outposts#AccessDeniedException":
|
|
@@ -809,10 +808,12 @@ const deserializeAws_restJson1CancelOrderCommandError = async (output, context)
|
|
|
809
808
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
810
809
|
default:
|
|
811
810
|
const parsedBody = parsedOutput.body;
|
|
811
|
+
const $metadata = deserializeMetadata(output);
|
|
812
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
812
813
|
response = new OutpostsServiceException_1.OutpostsServiceException({
|
|
813
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
814
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
814
815
|
$fault: "client",
|
|
815
|
-
$metadata
|
|
816
|
+
$metadata,
|
|
816
817
|
});
|
|
817
818
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
818
819
|
}
|
|
@@ -838,8 +839,7 @@ const deserializeAws_restJson1CreateOrderCommandError = async (output, context)
|
|
|
838
839
|
body: await parseBody(output.body, context),
|
|
839
840
|
};
|
|
840
841
|
let response;
|
|
841
|
-
|
|
842
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
842
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
843
843
|
switch (errorCode) {
|
|
844
844
|
case "AccessDeniedException":
|
|
845
845
|
case "com.amazonaws.outposts#AccessDeniedException":
|
|
@@ -861,10 +861,12 @@ const deserializeAws_restJson1CreateOrderCommandError = async (output, context)
|
|
|
861
861
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
862
862
|
default:
|
|
863
863
|
const parsedBody = parsedOutput.body;
|
|
864
|
+
const $metadata = deserializeMetadata(output);
|
|
865
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
864
866
|
response = new OutpostsServiceException_1.OutpostsServiceException({
|
|
865
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
867
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
866
868
|
$fault: "client",
|
|
867
|
-
$metadata
|
|
869
|
+
$metadata,
|
|
868
870
|
});
|
|
869
871
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
870
872
|
}
|
|
@@ -890,8 +892,7 @@ const deserializeAws_restJson1CreateOutpostCommandError = async (output, context
|
|
|
890
892
|
body: await parseBody(output.body, context),
|
|
891
893
|
};
|
|
892
894
|
let response;
|
|
893
|
-
|
|
894
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
895
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
895
896
|
switch (errorCode) {
|
|
896
897
|
case "AccessDeniedException":
|
|
897
898
|
case "com.amazonaws.outposts#AccessDeniedException":
|
|
@@ -913,10 +914,12 @@ const deserializeAws_restJson1CreateOutpostCommandError = async (output, context
|
|
|
913
914
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
914
915
|
default:
|
|
915
916
|
const parsedBody = parsedOutput.body;
|
|
917
|
+
const $metadata = deserializeMetadata(output);
|
|
918
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
916
919
|
response = new OutpostsServiceException_1.OutpostsServiceException({
|
|
917
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
920
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
918
921
|
$fault: "client",
|
|
919
|
-
$metadata
|
|
922
|
+
$metadata,
|
|
920
923
|
});
|
|
921
924
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
922
925
|
}
|
|
@@ -942,8 +945,7 @@ const deserializeAws_restJson1CreateSiteCommandError = async (output, context) =
|
|
|
942
945
|
body: await parseBody(output.body, context),
|
|
943
946
|
};
|
|
944
947
|
let response;
|
|
945
|
-
|
|
946
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
948
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
947
949
|
switch (errorCode) {
|
|
948
950
|
case "AccessDeniedException":
|
|
949
951
|
case "com.amazonaws.outposts#AccessDeniedException":
|
|
@@ -962,10 +964,12 @@ const deserializeAws_restJson1CreateSiteCommandError = async (output, context) =
|
|
|
962
964
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
963
965
|
default:
|
|
964
966
|
const parsedBody = parsedOutput.body;
|
|
967
|
+
const $metadata = deserializeMetadata(output);
|
|
968
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
965
969
|
response = new OutpostsServiceException_1.OutpostsServiceException({
|
|
966
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
970
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
967
971
|
$fault: "client",
|
|
968
|
-
$metadata
|
|
972
|
+
$metadata,
|
|
969
973
|
});
|
|
970
974
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
971
975
|
}
|
|
@@ -987,8 +991,7 @@ const deserializeAws_restJson1DeleteOutpostCommandError = async (output, context
|
|
|
987
991
|
body: await parseBody(output.body, context),
|
|
988
992
|
};
|
|
989
993
|
let response;
|
|
990
|
-
|
|
991
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
994
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
992
995
|
switch (errorCode) {
|
|
993
996
|
case "AccessDeniedException":
|
|
994
997
|
case "com.amazonaws.outposts#AccessDeniedException":
|
|
@@ -1007,10 +1010,12 @@ const deserializeAws_restJson1DeleteOutpostCommandError = async (output, context
|
|
|
1007
1010
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1008
1011
|
default:
|
|
1009
1012
|
const parsedBody = parsedOutput.body;
|
|
1013
|
+
const $metadata = deserializeMetadata(output);
|
|
1014
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1010
1015
|
response = new OutpostsServiceException_1.OutpostsServiceException({
|
|
1011
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1016
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1012
1017
|
$fault: "client",
|
|
1013
|
-
$metadata
|
|
1018
|
+
$metadata,
|
|
1014
1019
|
});
|
|
1015
1020
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1016
1021
|
}
|
|
@@ -1032,8 +1037,7 @@ const deserializeAws_restJson1DeleteSiteCommandError = async (output, context) =
|
|
|
1032
1037
|
body: await parseBody(output.body, context),
|
|
1033
1038
|
};
|
|
1034
1039
|
let response;
|
|
1035
|
-
|
|
1036
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1040
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1037
1041
|
switch (errorCode) {
|
|
1038
1042
|
case "AccessDeniedException":
|
|
1039
1043
|
case "com.amazonaws.outposts#AccessDeniedException":
|
|
@@ -1052,10 +1056,12 @@ const deserializeAws_restJson1DeleteSiteCommandError = async (output, context) =
|
|
|
1052
1056
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1053
1057
|
default:
|
|
1054
1058
|
const parsedBody = parsedOutput.body;
|
|
1059
|
+
const $metadata = deserializeMetadata(output);
|
|
1060
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1055
1061
|
response = new OutpostsServiceException_1.OutpostsServiceException({
|
|
1056
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1062
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1057
1063
|
$fault: "client",
|
|
1058
|
-
$metadata
|
|
1064
|
+
$metadata,
|
|
1059
1065
|
});
|
|
1060
1066
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1061
1067
|
}
|
|
@@ -1081,8 +1087,7 @@ const deserializeAws_restJson1GetCatalogItemCommandError = async (output, contex
|
|
|
1081
1087
|
body: await parseBody(output.body, context),
|
|
1082
1088
|
};
|
|
1083
1089
|
let response;
|
|
1084
|
-
|
|
1085
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1090
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1086
1091
|
switch (errorCode) {
|
|
1087
1092
|
case "InternalServerException":
|
|
1088
1093
|
case "com.amazonaws.outposts#InternalServerException":
|
|
@@ -1095,10 +1100,12 @@ const deserializeAws_restJson1GetCatalogItemCommandError = async (output, contex
|
|
|
1095
1100
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1096
1101
|
default:
|
|
1097
1102
|
const parsedBody = parsedOutput.body;
|
|
1103
|
+
const $metadata = deserializeMetadata(output);
|
|
1104
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1098
1105
|
response = new OutpostsServiceException_1.OutpostsServiceException({
|
|
1099
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1106
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1100
1107
|
$fault: "client",
|
|
1101
|
-
$metadata
|
|
1108
|
+
$metadata,
|
|
1102
1109
|
});
|
|
1103
1110
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1104
1111
|
}
|
|
@@ -1128,8 +1135,7 @@ const deserializeAws_restJson1GetConnectionCommandError = async (output, context
|
|
|
1128
1135
|
body: await parseBody(output.body, context),
|
|
1129
1136
|
};
|
|
1130
1137
|
let response;
|
|
1131
|
-
|
|
1132
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1138
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1133
1139
|
switch (errorCode) {
|
|
1134
1140
|
case "AccessDeniedException":
|
|
1135
1141
|
case "com.amazonaws.outposts#AccessDeniedException":
|
|
@@ -1145,10 +1151,12 @@ const deserializeAws_restJson1GetConnectionCommandError = async (output, context
|
|
|
1145
1151
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1146
1152
|
default:
|
|
1147
1153
|
const parsedBody = parsedOutput.body;
|
|
1154
|
+
const $metadata = deserializeMetadata(output);
|
|
1155
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1148
1156
|
response = new OutpostsServiceException_1.OutpostsServiceException({
|
|
1149
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1157
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1150
1158
|
$fault: "client",
|
|
1151
|
-
$metadata
|
|
1159
|
+
$metadata,
|
|
1152
1160
|
});
|
|
1153
1161
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1154
1162
|
}
|
|
@@ -1174,8 +1182,7 @@ const deserializeAws_restJson1GetOrderCommandError = async (output, context) =>
|
|
|
1174
1182
|
body: await parseBody(output.body, context),
|
|
1175
1183
|
};
|
|
1176
1184
|
let response;
|
|
1177
|
-
|
|
1178
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1185
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1179
1186
|
switch (errorCode) {
|
|
1180
1187
|
case "InternalServerException":
|
|
1181
1188
|
case "com.amazonaws.outposts#InternalServerException":
|
|
@@ -1188,10 +1195,12 @@ const deserializeAws_restJson1GetOrderCommandError = async (output, context) =>
|
|
|
1188
1195
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1189
1196
|
default:
|
|
1190
1197
|
const parsedBody = parsedOutput.body;
|
|
1198
|
+
const $metadata = deserializeMetadata(output);
|
|
1199
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1191
1200
|
response = new OutpostsServiceException_1.OutpostsServiceException({
|
|
1192
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1201
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1193
1202
|
$fault: "client",
|
|
1194
|
-
$metadata
|
|
1203
|
+
$metadata,
|
|
1195
1204
|
});
|
|
1196
1205
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1197
1206
|
}
|
|
@@ -1217,8 +1226,7 @@ const deserializeAws_restJson1GetOutpostCommandError = async (output, context) =
|
|
|
1217
1226
|
body: await parseBody(output.body, context),
|
|
1218
1227
|
};
|
|
1219
1228
|
let response;
|
|
1220
|
-
|
|
1221
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1229
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1222
1230
|
switch (errorCode) {
|
|
1223
1231
|
case "AccessDeniedException":
|
|
1224
1232
|
case "com.amazonaws.outposts#AccessDeniedException":
|
|
@@ -1234,10 +1242,12 @@ const deserializeAws_restJson1GetOutpostCommandError = async (output, context) =
|
|
|
1234
1242
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1235
1243
|
default:
|
|
1236
1244
|
const parsedBody = parsedOutput.body;
|
|
1245
|
+
const $metadata = deserializeMetadata(output);
|
|
1246
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1237
1247
|
response = new OutpostsServiceException_1.OutpostsServiceException({
|
|
1238
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1248
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1239
1249
|
$fault: "client",
|
|
1240
|
-
$metadata
|
|
1250
|
+
$metadata,
|
|
1241
1251
|
});
|
|
1242
1252
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1243
1253
|
}
|
|
@@ -1275,8 +1285,7 @@ const deserializeAws_restJson1GetOutpostInstanceTypesCommandError = async (outpu
|
|
|
1275
1285
|
body: await parseBody(output.body, context),
|
|
1276
1286
|
};
|
|
1277
1287
|
let response;
|
|
1278
|
-
|
|
1279
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1288
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1280
1289
|
switch (errorCode) {
|
|
1281
1290
|
case "AccessDeniedException":
|
|
1282
1291
|
case "com.amazonaws.outposts#AccessDeniedException":
|
|
@@ -1292,10 +1301,12 @@ const deserializeAws_restJson1GetOutpostInstanceTypesCommandError = async (outpu
|
|
|
1292
1301
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1293
1302
|
default:
|
|
1294
1303
|
const parsedBody = parsedOutput.body;
|
|
1304
|
+
const $metadata = deserializeMetadata(output);
|
|
1305
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1295
1306
|
response = new OutpostsServiceException_1.OutpostsServiceException({
|
|
1296
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1307
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1297
1308
|
$fault: "client",
|
|
1298
|
-
$metadata
|
|
1309
|
+
$metadata,
|
|
1299
1310
|
});
|
|
1300
1311
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1301
1312
|
}
|
|
@@ -1321,8 +1332,7 @@ const deserializeAws_restJson1GetSiteCommandError = async (output, context) => {
|
|
|
1321
1332
|
body: await parseBody(output.body, context),
|
|
1322
1333
|
};
|
|
1323
1334
|
let response;
|
|
1324
|
-
|
|
1325
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1335
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1326
1336
|
switch (errorCode) {
|
|
1327
1337
|
case "AccessDeniedException":
|
|
1328
1338
|
case "com.amazonaws.outposts#AccessDeniedException":
|
|
@@ -1338,10 +1348,12 @@ const deserializeAws_restJson1GetSiteCommandError = async (output, context) => {
|
|
|
1338
1348
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1339
1349
|
default:
|
|
1340
1350
|
const parsedBody = parsedOutput.body;
|
|
1351
|
+
const $metadata = deserializeMetadata(output);
|
|
1352
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1341
1353
|
response = new OutpostsServiceException_1.OutpostsServiceException({
|
|
1342
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1354
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1343
1355
|
$fault: "client",
|
|
1344
|
-
$metadata
|
|
1356
|
+
$metadata,
|
|
1345
1357
|
});
|
|
1346
1358
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1347
1359
|
}
|
|
@@ -1375,8 +1387,7 @@ const deserializeAws_restJson1GetSiteAddressCommandError = async (output, contex
|
|
|
1375
1387
|
body: await parseBody(output.body, context),
|
|
1376
1388
|
};
|
|
1377
1389
|
let response;
|
|
1378
|
-
|
|
1379
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1390
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1380
1391
|
switch (errorCode) {
|
|
1381
1392
|
case "AccessDeniedException":
|
|
1382
1393
|
case "com.amazonaws.outposts#AccessDeniedException":
|
|
@@ -1392,10 +1403,12 @@ const deserializeAws_restJson1GetSiteAddressCommandError = async (output, contex
|
|
|
1392
1403
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1393
1404
|
default:
|
|
1394
1405
|
const parsedBody = parsedOutput.body;
|
|
1406
|
+
const $metadata = deserializeMetadata(output);
|
|
1407
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1395
1408
|
response = new OutpostsServiceException_1.OutpostsServiceException({
|
|
1396
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1409
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1397
1410
|
$fault: "client",
|
|
1398
|
-
$metadata
|
|
1411
|
+
$metadata,
|
|
1399
1412
|
});
|
|
1400
1413
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1401
1414
|
}
|
|
@@ -1425,8 +1438,7 @@ const deserializeAws_restJson1ListAssetsCommandError = async (output, context) =
|
|
|
1425
1438
|
body: await parseBody(output.body, context),
|
|
1426
1439
|
};
|
|
1427
1440
|
let response;
|
|
1428
|
-
|
|
1429
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1441
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1430
1442
|
switch (errorCode) {
|
|
1431
1443
|
case "AccessDeniedException":
|
|
1432
1444
|
case "com.amazonaws.outposts#AccessDeniedException":
|
|
@@ -1442,10 +1454,12 @@ const deserializeAws_restJson1ListAssetsCommandError = async (output, context) =
|
|
|
1442
1454
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1443
1455
|
default:
|
|
1444
1456
|
const parsedBody = parsedOutput.body;
|
|
1457
|
+
const $metadata = deserializeMetadata(output);
|
|
1458
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1445
1459
|
response = new OutpostsServiceException_1.OutpostsServiceException({
|
|
1446
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1460
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1447
1461
|
$fault: "client",
|
|
1448
|
-
$metadata
|
|
1462
|
+
$metadata,
|
|
1449
1463
|
});
|
|
1450
1464
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1451
1465
|
}
|
|
@@ -1475,8 +1489,7 @@ const deserializeAws_restJson1ListCatalogItemsCommandError = async (output, cont
|
|
|
1475
1489
|
body: await parseBody(output.body, context),
|
|
1476
1490
|
};
|
|
1477
1491
|
let response;
|
|
1478
|
-
|
|
1479
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1492
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1480
1493
|
switch (errorCode) {
|
|
1481
1494
|
case "InternalServerException":
|
|
1482
1495
|
case "com.amazonaws.outposts#InternalServerException":
|
|
@@ -1489,10 +1502,12 @@ const deserializeAws_restJson1ListCatalogItemsCommandError = async (output, cont
|
|
|
1489
1502
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1490
1503
|
default:
|
|
1491
1504
|
const parsedBody = parsedOutput.body;
|
|
1505
|
+
const $metadata = deserializeMetadata(output);
|
|
1506
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1492
1507
|
response = new OutpostsServiceException_1.OutpostsServiceException({
|
|
1493
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1508
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1494
1509
|
$fault: "client",
|
|
1495
|
-
$metadata
|
|
1510
|
+
$metadata,
|
|
1496
1511
|
});
|
|
1497
1512
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1498
1513
|
}
|
|
@@ -1522,8 +1537,7 @@ const deserializeAws_restJson1ListOrdersCommandError = async (output, context) =
|
|
|
1522
1537
|
body: await parseBody(output.body, context),
|
|
1523
1538
|
};
|
|
1524
1539
|
let response;
|
|
1525
|
-
|
|
1526
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1540
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1527
1541
|
switch (errorCode) {
|
|
1528
1542
|
case "AccessDeniedException":
|
|
1529
1543
|
case "com.amazonaws.outposts#AccessDeniedException":
|
|
@@ -1539,10 +1553,12 @@ const deserializeAws_restJson1ListOrdersCommandError = async (output, context) =
|
|
|
1539
1553
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1540
1554
|
default:
|
|
1541
1555
|
const parsedBody = parsedOutput.body;
|
|
1556
|
+
const $metadata = deserializeMetadata(output);
|
|
1557
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1542
1558
|
response = new OutpostsServiceException_1.OutpostsServiceException({
|
|
1543
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1559
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1544
1560
|
$fault: "client",
|
|
1545
|
-
$metadata
|
|
1561
|
+
$metadata,
|
|
1546
1562
|
});
|
|
1547
1563
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1548
1564
|
}
|
|
@@ -1572,8 +1588,7 @@ const deserializeAws_restJson1ListOutpostsCommandError = async (output, context)
|
|
|
1572
1588
|
body: await parseBody(output.body, context),
|
|
1573
1589
|
};
|
|
1574
1590
|
let response;
|
|
1575
|
-
|
|
1576
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1591
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1577
1592
|
switch (errorCode) {
|
|
1578
1593
|
case "AccessDeniedException":
|
|
1579
1594
|
case "com.amazonaws.outposts#AccessDeniedException":
|
|
@@ -1586,10 +1601,12 @@ const deserializeAws_restJson1ListOutpostsCommandError = async (output, context)
|
|
|
1586
1601
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1587
1602
|
default:
|
|
1588
1603
|
const parsedBody = parsedOutput.body;
|
|
1604
|
+
const $metadata = deserializeMetadata(output);
|
|
1605
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1589
1606
|
response = new OutpostsServiceException_1.OutpostsServiceException({
|
|
1590
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1607
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1591
1608
|
$fault: "client",
|
|
1592
|
-
$metadata
|
|
1609
|
+
$metadata,
|
|
1593
1610
|
});
|
|
1594
1611
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1595
1612
|
}
|
|
@@ -1619,8 +1636,7 @@ const deserializeAws_restJson1ListSitesCommandError = async (output, context) =>
|
|
|
1619
1636
|
body: await parseBody(output.body, context),
|
|
1620
1637
|
};
|
|
1621
1638
|
let response;
|
|
1622
|
-
|
|
1623
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1639
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1624
1640
|
switch (errorCode) {
|
|
1625
1641
|
case "AccessDeniedException":
|
|
1626
1642
|
case "com.amazonaws.outposts#AccessDeniedException":
|
|
@@ -1633,10 +1649,12 @@ const deserializeAws_restJson1ListSitesCommandError = async (output, context) =>
|
|
|
1633
1649
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1634
1650
|
default:
|
|
1635
1651
|
const parsedBody = parsedOutput.body;
|
|
1652
|
+
const $metadata = deserializeMetadata(output);
|
|
1653
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1636
1654
|
response = new OutpostsServiceException_1.OutpostsServiceException({
|
|
1637
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1655
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1638
1656
|
$fault: "client",
|
|
1639
|
-
$metadata
|
|
1657
|
+
$metadata,
|
|
1640
1658
|
});
|
|
1641
1659
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1642
1660
|
}
|
|
@@ -1662,8 +1680,7 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
1662
1680
|
body: await parseBody(output.body, context),
|
|
1663
1681
|
};
|
|
1664
1682
|
let response;
|
|
1665
|
-
|
|
1666
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1683
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1667
1684
|
switch (errorCode) {
|
|
1668
1685
|
case "InternalServerException":
|
|
1669
1686
|
case "com.amazonaws.outposts#InternalServerException":
|
|
@@ -1676,10 +1693,12 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
1676
1693
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1677
1694
|
default:
|
|
1678
1695
|
const parsedBody = parsedOutput.body;
|
|
1696
|
+
const $metadata = deserializeMetadata(output);
|
|
1697
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1679
1698
|
response = new OutpostsServiceException_1.OutpostsServiceException({
|
|
1680
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1699
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1681
1700
|
$fault: "client",
|
|
1682
|
-
$metadata
|
|
1701
|
+
$metadata,
|
|
1683
1702
|
});
|
|
1684
1703
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1685
1704
|
}
|
|
@@ -1709,8 +1728,7 @@ const deserializeAws_restJson1StartConnectionCommandError = async (output, conte
|
|
|
1709
1728
|
body: await parseBody(output.body, context),
|
|
1710
1729
|
};
|
|
1711
1730
|
let response;
|
|
1712
|
-
|
|
1713
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1731
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1714
1732
|
switch (errorCode) {
|
|
1715
1733
|
case "AccessDeniedException":
|
|
1716
1734
|
case "com.amazonaws.outposts#AccessDeniedException":
|
|
@@ -1726,10 +1744,12 @@ const deserializeAws_restJson1StartConnectionCommandError = async (output, conte
|
|
|
1726
1744
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1727
1745
|
default:
|
|
1728
1746
|
const parsedBody = parsedOutput.body;
|
|
1747
|
+
const $metadata = deserializeMetadata(output);
|
|
1748
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1729
1749
|
response = new OutpostsServiceException_1.OutpostsServiceException({
|
|
1730
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1750
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1731
1751
|
$fault: "client",
|
|
1732
|
-
$metadata
|
|
1752
|
+
$metadata,
|
|
1733
1753
|
});
|
|
1734
1754
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1735
1755
|
}
|
|
@@ -1751,8 +1771,7 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
1751
1771
|
body: await parseBody(output.body, context),
|
|
1752
1772
|
};
|
|
1753
1773
|
let response;
|
|
1754
|
-
|
|
1755
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1774
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1756
1775
|
switch (errorCode) {
|
|
1757
1776
|
case "InternalServerException":
|
|
1758
1777
|
case "com.amazonaws.outposts#InternalServerException":
|
|
@@ -1765,10 +1784,12 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
1765
1784
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1766
1785
|
default:
|
|
1767
1786
|
const parsedBody = parsedOutput.body;
|
|
1787
|
+
const $metadata = deserializeMetadata(output);
|
|
1788
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1768
1789
|
response = new OutpostsServiceException_1.OutpostsServiceException({
|
|
1769
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1790
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1770
1791
|
$fault: "client",
|
|
1771
|
-
$metadata
|
|
1792
|
+
$metadata,
|
|
1772
1793
|
});
|
|
1773
1794
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1774
1795
|
}
|
|
@@ -1790,8 +1811,7 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
1790
1811
|
body: await parseBody(output.body, context),
|
|
1791
1812
|
};
|
|
1792
1813
|
let response;
|
|
1793
|
-
|
|
1794
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1814
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1795
1815
|
switch (errorCode) {
|
|
1796
1816
|
case "InternalServerException":
|
|
1797
1817
|
case "com.amazonaws.outposts#InternalServerException":
|
|
@@ -1804,10 +1824,12 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
1804
1824
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1805
1825
|
default:
|
|
1806
1826
|
const parsedBody = parsedOutput.body;
|
|
1827
|
+
const $metadata = deserializeMetadata(output);
|
|
1828
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1807
1829
|
response = new OutpostsServiceException_1.OutpostsServiceException({
|
|
1808
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1830
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1809
1831
|
$fault: "client",
|
|
1810
|
-
$metadata
|
|
1832
|
+
$metadata,
|
|
1811
1833
|
});
|
|
1812
1834
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1813
1835
|
}
|
|
@@ -1833,8 +1855,7 @@ const deserializeAws_restJson1UpdateOutpostCommandError = async (output, context
|
|
|
1833
1855
|
body: await parseBody(output.body, context),
|
|
1834
1856
|
};
|
|
1835
1857
|
let response;
|
|
1836
|
-
|
|
1837
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1858
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1838
1859
|
switch (errorCode) {
|
|
1839
1860
|
case "AccessDeniedException":
|
|
1840
1861
|
case "com.amazonaws.outposts#AccessDeniedException":
|
|
@@ -1853,10 +1874,12 @@ const deserializeAws_restJson1UpdateOutpostCommandError = async (output, context
|
|
|
1853
1874
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1854
1875
|
default:
|
|
1855
1876
|
const parsedBody = parsedOutput.body;
|
|
1877
|
+
const $metadata = deserializeMetadata(output);
|
|
1878
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1856
1879
|
response = new OutpostsServiceException_1.OutpostsServiceException({
|
|
1857
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1880
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1858
1881
|
$fault: "client",
|
|
1859
|
-
$metadata
|
|
1882
|
+
$metadata,
|
|
1860
1883
|
});
|
|
1861
1884
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1862
1885
|
}
|
|
@@ -1882,8 +1905,7 @@ const deserializeAws_restJson1UpdateSiteCommandError = async (output, context) =
|
|
|
1882
1905
|
body: await parseBody(output.body, context),
|
|
1883
1906
|
};
|
|
1884
1907
|
let response;
|
|
1885
|
-
|
|
1886
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1908
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1887
1909
|
switch (errorCode) {
|
|
1888
1910
|
case "AccessDeniedException":
|
|
1889
1911
|
case "com.amazonaws.outposts#AccessDeniedException":
|
|
@@ -1902,10 +1924,12 @@ const deserializeAws_restJson1UpdateSiteCommandError = async (output, context) =
|
|
|
1902
1924
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1903
1925
|
default:
|
|
1904
1926
|
const parsedBody = parsedOutput.body;
|
|
1927
|
+
const $metadata = deserializeMetadata(output);
|
|
1928
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1905
1929
|
response = new OutpostsServiceException_1.OutpostsServiceException({
|
|
1906
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1930
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1907
1931
|
$fault: "client",
|
|
1908
|
-
$metadata
|
|
1932
|
+
$metadata,
|
|
1909
1933
|
});
|
|
1910
1934
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1911
1935
|
}
|
|
@@ -1935,8 +1959,7 @@ const deserializeAws_restJson1UpdateSiteAddressCommandError = async (output, con
|
|
|
1935
1959
|
body: await parseBody(output.body, context),
|
|
1936
1960
|
};
|
|
1937
1961
|
let response;
|
|
1938
|
-
|
|
1939
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1962
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1940
1963
|
switch (errorCode) {
|
|
1941
1964
|
case "AccessDeniedException":
|
|
1942
1965
|
case "com.amazonaws.outposts#AccessDeniedException":
|
|
@@ -1955,10 +1978,12 @@ const deserializeAws_restJson1UpdateSiteAddressCommandError = async (output, con
|
|
|
1955
1978
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1956
1979
|
default:
|
|
1957
1980
|
const parsedBody = parsedOutput.body;
|
|
1981
|
+
const $metadata = deserializeMetadata(output);
|
|
1982
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1958
1983
|
response = new OutpostsServiceException_1.OutpostsServiceException({
|
|
1959
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1984
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1960
1985
|
$fault: "client",
|
|
1961
|
-
$metadata
|
|
1986
|
+
$metadata,
|
|
1962
1987
|
});
|
|
1963
1988
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1964
1989
|
}
|
|
@@ -1984,8 +2009,7 @@ const deserializeAws_restJson1UpdateSiteRackPhysicalPropertiesCommandError = asy
|
|
|
1984
2009
|
body: await parseBody(output.body, context),
|
|
1985
2010
|
};
|
|
1986
2011
|
let response;
|
|
1987
|
-
|
|
1988
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2012
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1989
2013
|
switch (errorCode) {
|
|
1990
2014
|
case "AccessDeniedException":
|
|
1991
2015
|
case "com.amazonaws.outposts#AccessDeniedException":
|
|
@@ -2004,10 +2028,12 @@ const deserializeAws_restJson1UpdateSiteRackPhysicalPropertiesCommandError = asy
|
|
|
2004
2028
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2005
2029
|
default:
|
|
2006
2030
|
const parsedBody = parsedOutput.body;
|
|
2031
|
+
const $metadata = deserializeMetadata(output);
|
|
2032
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2007
2033
|
response = new OutpostsServiceException_1.OutpostsServiceException({
|
|
2008
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2034
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2009
2035
|
$fault: "client",
|
|
2010
|
-
$metadata
|
|
2036
|
+
$metadata,
|
|
2011
2037
|
});
|
|
2012
2038
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2013
2039
|
}
|
|
@@ -2514,5 +2540,4 @@ const loadRestJsonErrorCode = (output, data) => {
|
|
|
2514
2540
|
if (data["__type"] !== undefined) {
|
|
2515
2541
|
return sanitizeErrorCode(data["__type"]);
|
|
2516
2542
|
}
|
|
2517
|
-
return "";
|
|
2518
2543
|
};
|