@aws-sdk/client-cloudformation 3.312.0 → 3.315.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.
@@ -746,7 +746,7 @@ const de_ActivateTypeCommand = async (output, context) => {
746
746
  $metadata: deserializeMetadata(output),
747
747
  ...contents,
748
748
  };
749
- return Promise.resolve(response);
749
+ return response;
750
750
  };
751
751
  exports.de_ActivateTypeCommand = de_ActivateTypeCommand;
752
752
  const de_ActivateTypeCommandError = async (output, context) => {
@@ -764,10 +764,9 @@ const de_ActivateTypeCommandError = async (output, context) => {
764
764
  throw await de_TypeNotFoundExceptionRes(parsedOutput, context);
765
765
  default:
766
766
  const parsedBody = parsedOutput.body;
767
- (0, smithy_client_1.throwDefaultError)({
767
+ return throwDefaultError({
768
768
  output,
769
769
  parsedBody: parsedBody.Error,
770
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
771
770
  errorCode,
772
771
  });
773
772
  }
@@ -783,7 +782,7 @@ const de_BatchDescribeTypeConfigurationsCommand = async (output, context) => {
783
782
  $metadata: deserializeMetadata(output),
784
783
  ...contents,
785
784
  };
786
- return Promise.resolve(response);
785
+ return response;
787
786
  };
788
787
  exports.de_BatchDescribeTypeConfigurationsCommand = de_BatchDescribeTypeConfigurationsCommand;
789
788
  const de_BatchDescribeTypeConfigurationsCommandError = async (output, context) => {
@@ -801,10 +800,9 @@ const de_BatchDescribeTypeConfigurationsCommandError = async (output, context) =
801
800
  throw await de_TypeConfigurationNotFoundExceptionRes(parsedOutput, context);
802
801
  default:
803
802
  const parsedBody = parsedOutput.body;
804
- (0, smithy_client_1.throwDefaultError)({
803
+ return throwDefaultError({
805
804
  output,
806
805
  parsedBody: parsedBody.Error,
807
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
808
806
  errorCode,
809
807
  });
810
808
  }
@@ -817,7 +815,7 @@ const de_CancelUpdateStackCommand = async (output, context) => {
817
815
  const response = {
818
816
  $metadata: deserializeMetadata(output),
819
817
  };
820
- return Promise.resolve(response);
818
+ return response;
821
819
  };
822
820
  exports.de_CancelUpdateStackCommand = de_CancelUpdateStackCommand;
823
821
  const de_CancelUpdateStackCommandError = async (output, context) => {
@@ -832,10 +830,9 @@ const de_CancelUpdateStackCommandError = async (output, context) => {
832
830
  throw await de_TokenAlreadyExistsExceptionRes(parsedOutput, context);
833
831
  default:
834
832
  const parsedBody = parsedOutput.body;
835
- (0, smithy_client_1.throwDefaultError)({
833
+ return throwDefaultError({
836
834
  output,
837
835
  parsedBody: parsedBody.Error,
838
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
839
836
  errorCode,
840
837
  });
841
838
  }
@@ -851,7 +848,7 @@ const de_ContinueUpdateRollbackCommand = async (output, context) => {
851
848
  $metadata: deserializeMetadata(output),
852
849
  ...contents,
853
850
  };
854
- return Promise.resolve(response);
851
+ return response;
855
852
  };
856
853
  exports.de_ContinueUpdateRollbackCommand = de_ContinueUpdateRollbackCommand;
857
854
  const de_ContinueUpdateRollbackCommandError = async (output, context) => {
@@ -866,10 +863,9 @@ const de_ContinueUpdateRollbackCommandError = async (output, context) => {
866
863
  throw await de_TokenAlreadyExistsExceptionRes(parsedOutput, context);
867
864
  default:
868
865
  const parsedBody = parsedOutput.body;
869
- (0, smithy_client_1.throwDefaultError)({
866
+ return throwDefaultError({
870
867
  output,
871
868
  parsedBody: parsedBody.Error,
872
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
873
869
  errorCode,
874
870
  });
875
871
  }
@@ -885,7 +881,7 @@ const de_CreateChangeSetCommand = async (output, context) => {
885
881
  $metadata: deserializeMetadata(output),
886
882
  ...contents,
887
883
  };
888
- return Promise.resolve(response);
884
+ return response;
889
885
  };
890
886
  exports.de_CreateChangeSetCommand = de_CreateChangeSetCommand;
891
887
  const de_CreateChangeSetCommandError = async (output, context) => {
@@ -906,10 +902,9 @@ const de_CreateChangeSetCommandError = async (output, context) => {
906
902
  throw await de_LimitExceededExceptionRes(parsedOutput, context);
907
903
  default:
908
904
  const parsedBody = parsedOutput.body;
909
- (0, smithy_client_1.throwDefaultError)({
905
+ return throwDefaultError({
910
906
  output,
911
907
  parsedBody: parsedBody.Error,
912
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
913
908
  errorCode,
914
909
  });
915
910
  }
@@ -925,7 +920,7 @@ const de_CreateStackCommand = async (output, context) => {
925
920
  $metadata: deserializeMetadata(output),
926
921
  ...contents,
927
922
  };
928
- return Promise.resolve(response);
923
+ return response;
929
924
  };
930
925
  exports.de_CreateStackCommand = de_CreateStackCommand;
931
926
  const de_CreateStackCommandError = async (output, context) => {
@@ -949,10 +944,9 @@ const de_CreateStackCommandError = async (output, context) => {
949
944
  throw await de_TokenAlreadyExistsExceptionRes(parsedOutput, context);
950
945
  default:
951
946
  const parsedBody = parsedOutput.body;
952
- (0, smithy_client_1.throwDefaultError)({
947
+ return throwDefaultError({
953
948
  output,
954
949
  parsedBody: parsedBody.Error,
955
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
956
950
  errorCode,
957
951
  });
958
952
  }
@@ -968,7 +962,7 @@ const de_CreateStackInstancesCommand = async (output, context) => {
968
962
  $metadata: deserializeMetadata(output),
969
963
  ...contents,
970
964
  };
971
- return Promise.resolve(response);
965
+ return response;
972
966
  };
973
967
  exports.de_CreateStackInstancesCommand = de_CreateStackInstancesCommand;
974
968
  const de_CreateStackInstancesCommandError = async (output, context) => {
@@ -998,10 +992,9 @@ const de_CreateStackInstancesCommandError = async (output, context) => {
998
992
  throw await de_StaleRequestExceptionRes(parsedOutput, context);
999
993
  default:
1000
994
  const parsedBody = parsedOutput.body;
1001
- (0, smithy_client_1.throwDefaultError)({
995
+ return throwDefaultError({
1002
996
  output,
1003
997
  parsedBody: parsedBody.Error,
1004
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
1005
998
  errorCode,
1006
999
  });
1007
1000
  }
@@ -1017,7 +1010,7 @@ const de_CreateStackSetCommand = async (output, context) => {
1017
1010
  $metadata: deserializeMetadata(output),
1018
1011
  ...contents,
1019
1012
  };
1020
- return Promise.resolve(response);
1013
+ return response;
1021
1014
  };
1022
1015
  exports.de_CreateStackSetCommand = de_CreateStackSetCommand;
1023
1016
  const de_CreateStackSetCommandError = async (output, context) => {
@@ -1038,10 +1031,9 @@ const de_CreateStackSetCommandError = async (output, context) => {
1038
1031
  throw await de_NameAlreadyExistsExceptionRes(parsedOutput, context);
1039
1032
  default:
1040
1033
  const parsedBody = parsedOutput.body;
1041
- (0, smithy_client_1.throwDefaultError)({
1034
+ return throwDefaultError({
1042
1035
  output,
1043
1036
  parsedBody: parsedBody.Error,
1044
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
1045
1037
  errorCode,
1046
1038
  });
1047
1039
  }
@@ -1057,7 +1049,7 @@ const de_DeactivateTypeCommand = async (output, context) => {
1057
1049
  $metadata: deserializeMetadata(output),
1058
1050
  ...contents,
1059
1051
  };
1060
- return Promise.resolve(response);
1052
+ return response;
1061
1053
  };
1062
1054
  exports.de_DeactivateTypeCommand = de_DeactivateTypeCommand;
1063
1055
  const de_DeactivateTypeCommandError = async (output, context) => {
@@ -1075,10 +1067,9 @@ const de_DeactivateTypeCommandError = async (output, context) => {
1075
1067
  throw await de_TypeNotFoundExceptionRes(parsedOutput, context);
1076
1068
  default:
1077
1069
  const parsedBody = parsedOutput.body;
1078
- (0, smithy_client_1.throwDefaultError)({
1070
+ return throwDefaultError({
1079
1071
  output,
1080
1072
  parsedBody: parsedBody.Error,
1081
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
1082
1073
  errorCode,
1083
1074
  });
1084
1075
  }
@@ -1094,7 +1085,7 @@ const de_DeleteChangeSetCommand = async (output, context) => {
1094
1085
  $metadata: deserializeMetadata(output),
1095
1086
  ...contents,
1096
1087
  };
1097
- return Promise.resolve(response);
1088
+ return response;
1098
1089
  };
1099
1090
  exports.de_DeleteChangeSetCommand = de_DeleteChangeSetCommand;
1100
1091
  const de_DeleteChangeSetCommandError = async (output, context) => {
@@ -1109,10 +1100,9 @@ const de_DeleteChangeSetCommandError = async (output, context) => {
1109
1100
  throw await de_InvalidChangeSetStatusExceptionRes(parsedOutput, context);
1110
1101
  default:
1111
1102
  const parsedBody = parsedOutput.body;
1112
- (0, smithy_client_1.throwDefaultError)({
1103
+ return throwDefaultError({
1113
1104
  output,
1114
1105
  parsedBody: parsedBody.Error,
1115
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
1116
1106
  errorCode,
1117
1107
  });
1118
1108
  }
@@ -1125,7 +1115,7 @@ const de_DeleteStackCommand = async (output, context) => {
1125
1115
  const response = {
1126
1116
  $metadata: deserializeMetadata(output),
1127
1117
  };
1128
- return Promise.resolve(response);
1118
+ return response;
1129
1119
  };
1130
1120
  exports.de_DeleteStackCommand = de_DeleteStackCommand;
1131
1121
  const de_DeleteStackCommandError = async (output, context) => {
@@ -1140,10 +1130,9 @@ const de_DeleteStackCommandError = async (output, context) => {
1140
1130
  throw await de_TokenAlreadyExistsExceptionRes(parsedOutput, context);
1141
1131
  default:
1142
1132
  const parsedBody = parsedOutput.body;
1143
- (0, smithy_client_1.throwDefaultError)({
1133
+ return throwDefaultError({
1144
1134
  output,
1145
1135
  parsedBody: parsedBody.Error,
1146
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
1147
1136
  errorCode,
1148
1137
  });
1149
1138
  }
@@ -1159,7 +1148,7 @@ const de_DeleteStackInstancesCommand = async (output, context) => {
1159
1148
  $metadata: deserializeMetadata(output),
1160
1149
  ...contents,
1161
1150
  };
1162
- return Promise.resolve(response);
1151
+ return response;
1163
1152
  };
1164
1153
  exports.de_DeleteStackInstancesCommand = de_DeleteStackInstancesCommand;
1165
1154
  const de_DeleteStackInstancesCommandError = async (output, context) => {
@@ -1186,10 +1175,9 @@ const de_DeleteStackInstancesCommandError = async (output, context) => {
1186
1175
  throw await de_StaleRequestExceptionRes(parsedOutput, context);
1187
1176
  default:
1188
1177
  const parsedBody = parsedOutput.body;
1189
- (0, smithy_client_1.throwDefaultError)({
1178
+ return throwDefaultError({
1190
1179
  output,
1191
1180
  parsedBody: parsedBody.Error,
1192
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
1193
1181
  errorCode,
1194
1182
  });
1195
1183
  }
@@ -1205,7 +1193,7 @@ const de_DeleteStackSetCommand = async (output, context) => {
1205
1193
  $metadata: deserializeMetadata(output),
1206
1194
  ...contents,
1207
1195
  };
1208
- return Promise.resolve(response);
1196
+ return response;
1209
1197
  };
1210
1198
  exports.de_DeleteStackSetCommand = de_DeleteStackSetCommand;
1211
1199
  const de_DeleteStackSetCommandError = async (output, context) => {
@@ -1223,10 +1211,9 @@ const de_DeleteStackSetCommandError = async (output, context) => {
1223
1211
  throw await de_StackSetNotEmptyExceptionRes(parsedOutput, context);
1224
1212
  default:
1225
1213
  const parsedBody = parsedOutput.body;
1226
- (0, smithy_client_1.throwDefaultError)({
1214
+ return throwDefaultError({
1227
1215
  output,
1228
1216
  parsedBody: parsedBody.Error,
1229
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
1230
1217
  errorCode,
1231
1218
  });
1232
1219
  }
@@ -1242,7 +1229,7 @@ const de_DeregisterTypeCommand = async (output, context) => {
1242
1229
  $metadata: deserializeMetadata(output),
1243
1230
  ...contents,
1244
1231
  };
1245
- return Promise.resolve(response);
1232
+ return response;
1246
1233
  };
1247
1234
  exports.de_DeregisterTypeCommand = de_DeregisterTypeCommand;
1248
1235
  const de_DeregisterTypeCommandError = async (output, context) => {
@@ -1260,10 +1247,9 @@ const de_DeregisterTypeCommandError = async (output, context) => {
1260
1247
  throw await de_TypeNotFoundExceptionRes(parsedOutput, context);
1261
1248
  default:
1262
1249
  const parsedBody = parsedOutput.body;
1263
- (0, smithy_client_1.throwDefaultError)({
1250
+ return throwDefaultError({
1264
1251
  output,
1265
1252
  parsedBody: parsedBody.Error,
1266
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
1267
1253
  errorCode,
1268
1254
  });
1269
1255
  }
@@ -1279,7 +1265,7 @@ const de_DescribeAccountLimitsCommand = async (output, context) => {
1279
1265
  $metadata: deserializeMetadata(output),
1280
1266
  ...contents,
1281
1267
  };
1282
- return Promise.resolve(response);
1268
+ return response;
1283
1269
  };
1284
1270
  exports.de_DescribeAccountLimitsCommand = de_DescribeAccountLimitsCommand;
1285
1271
  const de_DescribeAccountLimitsCommandError = async (output, context) => {
@@ -1289,10 +1275,9 @@ const de_DescribeAccountLimitsCommandError = async (output, context) => {
1289
1275
  };
1290
1276
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1291
1277
  const parsedBody = parsedOutput.body;
1292
- (0, smithy_client_1.throwDefaultError)({
1278
+ return throwDefaultError({
1293
1279
  output,
1294
1280
  parsedBody: parsedBody.Error,
1295
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
1296
1281
  errorCode,
1297
1282
  });
1298
1283
  };
@@ -1307,7 +1292,7 @@ const de_DescribeChangeSetCommand = async (output, context) => {
1307
1292
  $metadata: deserializeMetadata(output),
1308
1293
  ...contents,
1309
1294
  };
1310
- return Promise.resolve(response);
1295
+ return response;
1311
1296
  };
1312
1297
  exports.de_DescribeChangeSetCommand = de_DescribeChangeSetCommand;
1313
1298
  const de_DescribeChangeSetCommandError = async (output, context) => {
@@ -1322,10 +1307,9 @@ const de_DescribeChangeSetCommandError = async (output, context) => {
1322
1307
  throw await de_ChangeSetNotFoundExceptionRes(parsedOutput, context);
1323
1308
  default:
1324
1309
  const parsedBody = parsedOutput.body;
1325
- (0, smithy_client_1.throwDefaultError)({
1310
+ return throwDefaultError({
1326
1311
  output,
1327
1312
  parsedBody: parsedBody.Error,
1328
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
1329
1313
  errorCode,
1330
1314
  });
1331
1315
  }
@@ -1341,7 +1325,7 @@ const de_DescribeChangeSetHooksCommand = async (output, context) => {
1341
1325
  $metadata: deserializeMetadata(output),
1342
1326
  ...contents,
1343
1327
  };
1344
- return Promise.resolve(response);
1328
+ return response;
1345
1329
  };
1346
1330
  exports.de_DescribeChangeSetHooksCommand = de_DescribeChangeSetHooksCommand;
1347
1331
  const de_DescribeChangeSetHooksCommandError = async (output, context) => {
@@ -1356,10 +1340,9 @@ const de_DescribeChangeSetHooksCommandError = async (output, context) => {
1356
1340
  throw await de_ChangeSetNotFoundExceptionRes(parsedOutput, context);
1357
1341
  default:
1358
1342
  const parsedBody = parsedOutput.body;
1359
- (0, smithy_client_1.throwDefaultError)({
1343
+ return throwDefaultError({
1360
1344
  output,
1361
1345
  parsedBody: parsedBody.Error,
1362
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
1363
1346
  errorCode,
1364
1347
  });
1365
1348
  }
@@ -1375,7 +1358,7 @@ const de_DescribePublisherCommand = async (output, context) => {
1375
1358
  $metadata: deserializeMetadata(output),
1376
1359
  ...contents,
1377
1360
  };
1378
- return Promise.resolve(response);
1361
+ return response;
1379
1362
  };
1380
1363
  exports.de_DescribePublisherCommand = de_DescribePublisherCommand;
1381
1364
  const de_DescribePublisherCommandError = async (output, context) => {
@@ -1390,10 +1373,9 @@ const de_DescribePublisherCommandError = async (output, context) => {
1390
1373
  throw await de_CFNRegistryExceptionRes(parsedOutput, context);
1391
1374
  default:
1392
1375
  const parsedBody = parsedOutput.body;
1393
- (0, smithy_client_1.throwDefaultError)({
1376
+ return throwDefaultError({
1394
1377
  output,
1395
1378
  parsedBody: parsedBody.Error,
1396
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
1397
1379
  errorCode,
1398
1380
  });
1399
1381
  }
@@ -1409,7 +1391,7 @@ const de_DescribeStackDriftDetectionStatusCommand = async (output, context) => {
1409
1391
  $metadata: deserializeMetadata(output),
1410
1392
  ...contents,
1411
1393
  };
1412
- return Promise.resolve(response);
1394
+ return response;
1413
1395
  };
1414
1396
  exports.de_DescribeStackDriftDetectionStatusCommand = de_DescribeStackDriftDetectionStatusCommand;
1415
1397
  const de_DescribeStackDriftDetectionStatusCommandError = async (output, context) => {
@@ -1419,10 +1401,9 @@ const de_DescribeStackDriftDetectionStatusCommandError = async (output, context)
1419
1401
  };
1420
1402
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1421
1403
  const parsedBody = parsedOutput.body;
1422
- (0, smithy_client_1.throwDefaultError)({
1404
+ return throwDefaultError({
1423
1405
  output,
1424
1406
  parsedBody: parsedBody.Error,
1425
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
1426
1407
  errorCode,
1427
1408
  });
1428
1409
  };
@@ -1437,7 +1418,7 @@ const de_DescribeStackEventsCommand = async (output, context) => {
1437
1418
  $metadata: deserializeMetadata(output),
1438
1419
  ...contents,
1439
1420
  };
1440
- return Promise.resolve(response);
1421
+ return response;
1441
1422
  };
1442
1423
  exports.de_DescribeStackEventsCommand = de_DescribeStackEventsCommand;
1443
1424
  const de_DescribeStackEventsCommandError = async (output, context) => {
@@ -1447,10 +1428,9 @@ const de_DescribeStackEventsCommandError = async (output, context) => {
1447
1428
  };
1448
1429
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1449
1430
  const parsedBody = parsedOutput.body;
1450
- (0, smithy_client_1.throwDefaultError)({
1431
+ return throwDefaultError({
1451
1432
  output,
1452
1433
  parsedBody: parsedBody.Error,
1453
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
1454
1434
  errorCode,
1455
1435
  });
1456
1436
  };
@@ -1465,7 +1445,7 @@ const de_DescribeStackInstanceCommand = async (output, context) => {
1465
1445
  $metadata: deserializeMetadata(output),
1466
1446
  ...contents,
1467
1447
  };
1468
- return Promise.resolve(response);
1448
+ return response;
1469
1449
  };
1470
1450
  exports.de_DescribeStackInstanceCommand = de_DescribeStackInstanceCommand;
1471
1451
  const de_DescribeStackInstanceCommandError = async (output, context) => {
@@ -1483,10 +1463,9 @@ const de_DescribeStackInstanceCommandError = async (output, context) => {
1483
1463
  throw await de_StackSetNotFoundExceptionRes(parsedOutput, context);
1484
1464
  default:
1485
1465
  const parsedBody = parsedOutput.body;
1486
- (0, smithy_client_1.throwDefaultError)({
1466
+ return throwDefaultError({
1487
1467
  output,
1488
1468
  parsedBody: parsedBody.Error,
1489
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
1490
1469
  errorCode,
1491
1470
  });
1492
1471
  }
@@ -1502,7 +1481,7 @@ const de_DescribeStackResourceCommand = async (output, context) => {
1502
1481
  $metadata: deserializeMetadata(output),
1503
1482
  ...contents,
1504
1483
  };
1505
- return Promise.resolve(response);
1484
+ return response;
1506
1485
  };
1507
1486
  exports.de_DescribeStackResourceCommand = de_DescribeStackResourceCommand;
1508
1487
  const de_DescribeStackResourceCommandError = async (output, context) => {
@@ -1512,10 +1491,9 @@ const de_DescribeStackResourceCommandError = async (output, context) => {
1512
1491
  };
1513
1492
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1514
1493
  const parsedBody = parsedOutput.body;
1515
- (0, smithy_client_1.throwDefaultError)({
1494
+ return throwDefaultError({
1516
1495
  output,
1517
1496
  parsedBody: parsedBody.Error,
1518
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
1519
1497
  errorCode,
1520
1498
  });
1521
1499
  };
@@ -1530,7 +1508,7 @@ const de_DescribeStackResourceDriftsCommand = async (output, context) => {
1530
1508
  $metadata: deserializeMetadata(output),
1531
1509
  ...contents,
1532
1510
  };
1533
- return Promise.resolve(response);
1511
+ return response;
1534
1512
  };
1535
1513
  exports.de_DescribeStackResourceDriftsCommand = de_DescribeStackResourceDriftsCommand;
1536
1514
  const de_DescribeStackResourceDriftsCommandError = async (output, context) => {
@@ -1540,10 +1518,9 @@ const de_DescribeStackResourceDriftsCommandError = async (output, context) => {
1540
1518
  };
1541
1519
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1542
1520
  const parsedBody = parsedOutput.body;
1543
- (0, smithy_client_1.throwDefaultError)({
1521
+ return throwDefaultError({
1544
1522
  output,
1545
1523
  parsedBody: parsedBody.Error,
1546
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
1547
1524
  errorCode,
1548
1525
  });
1549
1526
  };
@@ -1558,7 +1535,7 @@ const de_DescribeStackResourcesCommand = async (output, context) => {
1558
1535
  $metadata: deserializeMetadata(output),
1559
1536
  ...contents,
1560
1537
  };
1561
- return Promise.resolve(response);
1538
+ return response;
1562
1539
  };
1563
1540
  exports.de_DescribeStackResourcesCommand = de_DescribeStackResourcesCommand;
1564
1541
  const de_DescribeStackResourcesCommandError = async (output, context) => {
@@ -1568,10 +1545,9 @@ const de_DescribeStackResourcesCommandError = async (output, context) => {
1568
1545
  };
1569
1546
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1570
1547
  const parsedBody = parsedOutput.body;
1571
- (0, smithy_client_1.throwDefaultError)({
1548
+ return throwDefaultError({
1572
1549
  output,
1573
1550
  parsedBody: parsedBody.Error,
1574
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
1575
1551
  errorCode,
1576
1552
  });
1577
1553
  };
@@ -1586,7 +1562,7 @@ const de_DescribeStacksCommand = async (output, context) => {
1586
1562
  $metadata: deserializeMetadata(output),
1587
1563
  ...contents,
1588
1564
  };
1589
- return Promise.resolve(response);
1565
+ return response;
1590
1566
  };
1591
1567
  exports.de_DescribeStacksCommand = de_DescribeStacksCommand;
1592
1568
  const de_DescribeStacksCommandError = async (output, context) => {
@@ -1596,10 +1572,9 @@ const de_DescribeStacksCommandError = async (output, context) => {
1596
1572
  };
1597
1573
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1598
1574
  const parsedBody = parsedOutput.body;
1599
- (0, smithy_client_1.throwDefaultError)({
1575
+ return throwDefaultError({
1600
1576
  output,
1601
1577
  parsedBody: parsedBody.Error,
1602
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
1603
1578
  errorCode,
1604
1579
  });
1605
1580
  };
@@ -1614,7 +1589,7 @@ const de_DescribeStackSetCommand = async (output, context) => {
1614
1589
  $metadata: deserializeMetadata(output),
1615
1590
  ...contents,
1616
1591
  };
1617
- return Promise.resolve(response);
1592
+ return response;
1618
1593
  };
1619
1594
  exports.de_DescribeStackSetCommand = de_DescribeStackSetCommand;
1620
1595
  const de_DescribeStackSetCommandError = async (output, context) => {
@@ -1629,10 +1604,9 @@ const de_DescribeStackSetCommandError = async (output, context) => {
1629
1604
  throw await de_StackSetNotFoundExceptionRes(parsedOutput, context);
1630
1605
  default:
1631
1606
  const parsedBody = parsedOutput.body;
1632
- (0, smithy_client_1.throwDefaultError)({
1607
+ return throwDefaultError({
1633
1608
  output,
1634
1609
  parsedBody: parsedBody.Error,
1635
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
1636
1610
  errorCode,
1637
1611
  });
1638
1612
  }
@@ -1648,7 +1622,7 @@ const de_DescribeStackSetOperationCommand = async (output, context) => {
1648
1622
  $metadata: deserializeMetadata(output),
1649
1623
  ...contents,
1650
1624
  };
1651
- return Promise.resolve(response);
1625
+ return response;
1652
1626
  };
1653
1627
  exports.de_DescribeStackSetOperationCommand = de_DescribeStackSetOperationCommand;
1654
1628
  const de_DescribeStackSetOperationCommandError = async (output, context) => {
@@ -1666,10 +1640,9 @@ const de_DescribeStackSetOperationCommandError = async (output, context) => {
1666
1640
  throw await de_StackSetNotFoundExceptionRes(parsedOutput, context);
1667
1641
  default:
1668
1642
  const parsedBody = parsedOutput.body;
1669
- (0, smithy_client_1.throwDefaultError)({
1643
+ return throwDefaultError({
1670
1644
  output,
1671
1645
  parsedBody: parsedBody.Error,
1672
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
1673
1646
  errorCode,
1674
1647
  });
1675
1648
  }
@@ -1685,7 +1658,7 @@ const de_DescribeTypeCommand = async (output, context) => {
1685
1658
  $metadata: deserializeMetadata(output),
1686
1659
  ...contents,
1687
1660
  };
1688
- return Promise.resolve(response);
1661
+ return response;
1689
1662
  };
1690
1663
  exports.de_DescribeTypeCommand = de_DescribeTypeCommand;
1691
1664
  const de_DescribeTypeCommandError = async (output, context) => {
@@ -1703,10 +1676,9 @@ const de_DescribeTypeCommandError = async (output, context) => {
1703
1676
  throw await de_TypeNotFoundExceptionRes(parsedOutput, context);
1704
1677
  default:
1705
1678
  const parsedBody = parsedOutput.body;
1706
- (0, smithy_client_1.throwDefaultError)({
1679
+ return throwDefaultError({
1707
1680
  output,
1708
1681
  parsedBody: parsedBody.Error,
1709
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
1710
1682
  errorCode,
1711
1683
  });
1712
1684
  }
@@ -1722,7 +1694,7 @@ const de_DescribeTypeRegistrationCommand = async (output, context) => {
1722
1694
  $metadata: deserializeMetadata(output),
1723
1695
  ...contents,
1724
1696
  };
1725
- return Promise.resolve(response);
1697
+ return response;
1726
1698
  };
1727
1699
  exports.de_DescribeTypeRegistrationCommand = de_DescribeTypeRegistrationCommand;
1728
1700
  const de_DescribeTypeRegistrationCommandError = async (output, context) => {
@@ -1737,10 +1709,9 @@ const de_DescribeTypeRegistrationCommandError = async (output, context) => {
1737
1709
  throw await de_CFNRegistryExceptionRes(parsedOutput, context);
1738
1710
  default:
1739
1711
  const parsedBody = parsedOutput.body;
1740
- (0, smithy_client_1.throwDefaultError)({
1712
+ return throwDefaultError({
1741
1713
  output,
1742
1714
  parsedBody: parsedBody.Error,
1743
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
1744
1715
  errorCode,
1745
1716
  });
1746
1717
  }
@@ -1756,7 +1727,7 @@ const de_DetectStackDriftCommand = async (output, context) => {
1756
1727
  $metadata: deserializeMetadata(output),
1757
1728
  ...contents,
1758
1729
  };
1759
- return Promise.resolve(response);
1730
+ return response;
1760
1731
  };
1761
1732
  exports.de_DetectStackDriftCommand = de_DetectStackDriftCommand;
1762
1733
  const de_DetectStackDriftCommandError = async (output, context) => {
@@ -1766,10 +1737,9 @@ const de_DetectStackDriftCommandError = async (output, context) => {
1766
1737
  };
1767
1738
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1768
1739
  const parsedBody = parsedOutput.body;
1769
- (0, smithy_client_1.throwDefaultError)({
1740
+ return throwDefaultError({
1770
1741
  output,
1771
1742
  parsedBody: parsedBody.Error,
1772
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
1773
1743
  errorCode,
1774
1744
  });
1775
1745
  };
@@ -1784,7 +1754,7 @@ const de_DetectStackResourceDriftCommand = async (output, context) => {
1784
1754
  $metadata: deserializeMetadata(output),
1785
1755
  ...contents,
1786
1756
  };
1787
- return Promise.resolve(response);
1757
+ return response;
1788
1758
  };
1789
1759
  exports.de_DetectStackResourceDriftCommand = de_DetectStackResourceDriftCommand;
1790
1760
  const de_DetectStackResourceDriftCommandError = async (output, context) => {
@@ -1794,10 +1764,9 @@ const de_DetectStackResourceDriftCommandError = async (output, context) => {
1794
1764
  };
1795
1765
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1796
1766
  const parsedBody = parsedOutput.body;
1797
- (0, smithy_client_1.throwDefaultError)({
1767
+ return throwDefaultError({
1798
1768
  output,
1799
1769
  parsedBody: parsedBody.Error,
1800
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
1801
1770
  errorCode,
1802
1771
  });
1803
1772
  };
@@ -1812,7 +1781,7 @@ const de_DetectStackSetDriftCommand = async (output, context) => {
1812
1781
  $metadata: deserializeMetadata(output),
1813
1782
  ...contents,
1814
1783
  };
1815
- return Promise.resolve(response);
1784
+ return response;
1816
1785
  };
1817
1786
  exports.de_DetectStackSetDriftCommand = de_DetectStackSetDriftCommand;
1818
1787
  const de_DetectStackSetDriftCommandError = async (output, context) => {
@@ -1833,10 +1802,9 @@ const de_DetectStackSetDriftCommandError = async (output, context) => {
1833
1802
  throw await de_StackSetNotFoundExceptionRes(parsedOutput, context);
1834
1803
  default:
1835
1804
  const parsedBody = parsedOutput.body;
1836
- (0, smithy_client_1.throwDefaultError)({
1805
+ return throwDefaultError({
1837
1806
  output,
1838
1807
  parsedBody: parsedBody.Error,
1839
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
1840
1808
  errorCode,
1841
1809
  });
1842
1810
  }
@@ -1852,7 +1820,7 @@ const de_EstimateTemplateCostCommand = async (output, context) => {
1852
1820
  $metadata: deserializeMetadata(output),
1853
1821
  ...contents,
1854
1822
  };
1855
- return Promise.resolve(response);
1823
+ return response;
1856
1824
  };
1857
1825
  exports.de_EstimateTemplateCostCommand = de_EstimateTemplateCostCommand;
1858
1826
  const de_EstimateTemplateCostCommandError = async (output, context) => {
@@ -1862,10 +1830,9 @@ const de_EstimateTemplateCostCommandError = async (output, context) => {
1862
1830
  };
1863
1831
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1864
1832
  const parsedBody = parsedOutput.body;
1865
- (0, smithy_client_1.throwDefaultError)({
1833
+ return throwDefaultError({
1866
1834
  output,
1867
1835
  parsedBody: parsedBody.Error,
1868
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
1869
1836
  errorCode,
1870
1837
  });
1871
1838
  };
@@ -1880,7 +1847,7 @@ const de_ExecuteChangeSetCommand = async (output, context) => {
1880
1847
  $metadata: deserializeMetadata(output),
1881
1848
  ...contents,
1882
1849
  };
1883
- return Promise.resolve(response);
1850
+ return response;
1884
1851
  };
1885
1852
  exports.de_ExecuteChangeSetCommand = de_ExecuteChangeSetCommand;
1886
1853
  const de_ExecuteChangeSetCommandError = async (output, context) => {
@@ -1904,10 +1871,9 @@ const de_ExecuteChangeSetCommandError = async (output, context) => {
1904
1871
  throw await de_TokenAlreadyExistsExceptionRes(parsedOutput, context);
1905
1872
  default:
1906
1873
  const parsedBody = parsedOutput.body;
1907
- (0, smithy_client_1.throwDefaultError)({
1874
+ return throwDefaultError({
1908
1875
  output,
1909
1876
  parsedBody: parsedBody.Error,
1910
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
1911
1877
  errorCode,
1912
1878
  });
1913
1879
  }
@@ -1923,7 +1889,7 @@ const de_GetStackPolicyCommand = async (output, context) => {
1923
1889
  $metadata: deserializeMetadata(output),
1924
1890
  ...contents,
1925
1891
  };
1926
- return Promise.resolve(response);
1892
+ return response;
1927
1893
  };
1928
1894
  exports.de_GetStackPolicyCommand = de_GetStackPolicyCommand;
1929
1895
  const de_GetStackPolicyCommandError = async (output, context) => {
@@ -1933,10 +1899,9 @@ const de_GetStackPolicyCommandError = async (output, context) => {
1933
1899
  };
1934
1900
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1935
1901
  const parsedBody = parsedOutput.body;
1936
- (0, smithy_client_1.throwDefaultError)({
1902
+ return throwDefaultError({
1937
1903
  output,
1938
1904
  parsedBody: parsedBody.Error,
1939
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
1940
1905
  errorCode,
1941
1906
  });
1942
1907
  };
@@ -1951,7 +1916,7 @@ const de_GetTemplateCommand = async (output, context) => {
1951
1916
  $metadata: deserializeMetadata(output),
1952
1917
  ...contents,
1953
1918
  };
1954
- return Promise.resolve(response);
1919
+ return response;
1955
1920
  };
1956
1921
  exports.de_GetTemplateCommand = de_GetTemplateCommand;
1957
1922
  const de_GetTemplateCommandError = async (output, context) => {
@@ -1966,10 +1931,9 @@ const de_GetTemplateCommandError = async (output, context) => {
1966
1931
  throw await de_ChangeSetNotFoundExceptionRes(parsedOutput, context);
1967
1932
  default:
1968
1933
  const parsedBody = parsedOutput.body;
1969
- (0, smithy_client_1.throwDefaultError)({
1934
+ return throwDefaultError({
1970
1935
  output,
1971
1936
  parsedBody: parsedBody.Error,
1972
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
1973
1937
  errorCode,
1974
1938
  });
1975
1939
  }
@@ -1985,7 +1949,7 @@ const de_GetTemplateSummaryCommand = async (output, context) => {
1985
1949
  $metadata: deserializeMetadata(output),
1986
1950
  ...contents,
1987
1951
  };
1988
- return Promise.resolve(response);
1952
+ return response;
1989
1953
  };
1990
1954
  exports.de_GetTemplateSummaryCommand = de_GetTemplateSummaryCommand;
1991
1955
  const de_GetTemplateSummaryCommandError = async (output, context) => {
@@ -2000,10 +1964,9 @@ const de_GetTemplateSummaryCommandError = async (output, context) => {
2000
1964
  throw await de_StackSetNotFoundExceptionRes(parsedOutput, context);
2001
1965
  default:
2002
1966
  const parsedBody = parsedOutput.body;
2003
- (0, smithy_client_1.throwDefaultError)({
1967
+ return throwDefaultError({
2004
1968
  output,
2005
1969
  parsedBody: parsedBody.Error,
2006
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
2007
1970
  errorCode,
2008
1971
  });
2009
1972
  }
@@ -2019,7 +1982,7 @@ const de_ImportStacksToStackSetCommand = async (output, context) => {
2019
1982
  $metadata: deserializeMetadata(output),
2020
1983
  ...contents,
2021
1984
  };
2022
- return Promise.resolve(response);
1985
+ return response;
2023
1986
  };
2024
1987
  exports.de_ImportStacksToStackSetCommand = de_ImportStacksToStackSetCommand;
2025
1988
  const de_ImportStacksToStackSetCommandError = async (output, context) => {
@@ -2052,10 +2015,9 @@ const de_ImportStacksToStackSetCommandError = async (output, context) => {
2052
2015
  throw await de_StaleRequestExceptionRes(parsedOutput, context);
2053
2016
  default:
2054
2017
  const parsedBody = parsedOutput.body;
2055
- (0, smithy_client_1.throwDefaultError)({
2018
+ return throwDefaultError({
2056
2019
  output,
2057
2020
  parsedBody: parsedBody.Error,
2058
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
2059
2021
  errorCode,
2060
2022
  });
2061
2023
  }
@@ -2071,7 +2033,7 @@ const de_ListChangeSetsCommand = async (output, context) => {
2071
2033
  $metadata: deserializeMetadata(output),
2072
2034
  ...contents,
2073
2035
  };
2074
- return Promise.resolve(response);
2036
+ return response;
2075
2037
  };
2076
2038
  exports.de_ListChangeSetsCommand = de_ListChangeSetsCommand;
2077
2039
  const de_ListChangeSetsCommandError = async (output, context) => {
@@ -2081,10 +2043,9 @@ const de_ListChangeSetsCommandError = async (output, context) => {
2081
2043
  };
2082
2044
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
2083
2045
  const parsedBody = parsedOutput.body;
2084
- (0, smithy_client_1.throwDefaultError)({
2046
+ return throwDefaultError({
2085
2047
  output,
2086
2048
  parsedBody: parsedBody.Error,
2087
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
2088
2049
  errorCode,
2089
2050
  });
2090
2051
  };
@@ -2099,7 +2060,7 @@ const de_ListExportsCommand = async (output, context) => {
2099
2060
  $metadata: deserializeMetadata(output),
2100
2061
  ...contents,
2101
2062
  };
2102
- return Promise.resolve(response);
2063
+ return response;
2103
2064
  };
2104
2065
  exports.de_ListExportsCommand = de_ListExportsCommand;
2105
2066
  const de_ListExportsCommandError = async (output, context) => {
@@ -2109,10 +2070,9 @@ const de_ListExportsCommandError = async (output, context) => {
2109
2070
  };
2110
2071
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
2111
2072
  const parsedBody = parsedOutput.body;
2112
- (0, smithy_client_1.throwDefaultError)({
2073
+ return throwDefaultError({
2113
2074
  output,
2114
2075
  parsedBody: parsedBody.Error,
2115
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
2116
2076
  errorCode,
2117
2077
  });
2118
2078
  };
@@ -2127,7 +2087,7 @@ const de_ListImportsCommand = async (output, context) => {
2127
2087
  $metadata: deserializeMetadata(output),
2128
2088
  ...contents,
2129
2089
  };
2130
- return Promise.resolve(response);
2090
+ return response;
2131
2091
  };
2132
2092
  exports.de_ListImportsCommand = de_ListImportsCommand;
2133
2093
  const de_ListImportsCommandError = async (output, context) => {
@@ -2137,10 +2097,9 @@ const de_ListImportsCommandError = async (output, context) => {
2137
2097
  };
2138
2098
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
2139
2099
  const parsedBody = parsedOutput.body;
2140
- (0, smithy_client_1.throwDefaultError)({
2100
+ return throwDefaultError({
2141
2101
  output,
2142
2102
  parsedBody: parsedBody.Error,
2143
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
2144
2103
  errorCode,
2145
2104
  });
2146
2105
  };
@@ -2155,7 +2114,7 @@ const de_ListStackInstancesCommand = async (output, context) => {
2155
2114
  $metadata: deserializeMetadata(output),
2156
2115
  ...contents,
2157
2116
  };
2158
- return Promise.resolve(response);
2117
+ return response;
2159
2118
  };
2160
2119
  exports.de_ListStackInstancesCommand = de_ListStackInstancesCommand;
2161
2120
  const de_ListStackInstancesCommandError = async (output, context) => {
@@ -2170,10 +2129,9 @@ const de_ListStackInstancesCommandError = async (output, context) => {
2170
2129
  throw await de_StackSetNotFoundExceptionRes(parsedOutput, context);
2171
2130
  default:
2172
2131
  const parsedBody = parsedOutput.body;
2173
- (0, smithy_client_1.throwDefaultError)({
2132
+ return throwDefaultError({
2174
2133
  output,
2175
2134
  parsedBody: parsedBody.Error,
2176
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
2177
2135
  errorCode,
2178
2136
  });
2179
2137
  }
@@ -2189,7 +2147,7 @@ const de_ListStackResourcesCommand = async (output, context) => {
2189
2147
  $metadata: deserializeMetadata(output),
2190
2148
  ...contents,
2191
2149
  };
2192
- return Promise.resolve(response);
2150
+ return response;
2193
2151
  };
2194
2152
  exports.de_ListStackResourcesCommand = de_ListStackResourcesCommand;
2195
2153
  const de_ListStackResourcesCommandError = async (output, context) => {
@@ -2199,10 +2157,9 @@ const de_ListStackResourcesCommandError = async (output, context) => {
2199
2157
  };
2200
2158
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
2201
2159
  const parsedBody = parsedOutput.body;
2202
- (0, smithy_client_1.throwDefaultError)({
2160
+ return throwDefaultError({
2203
2161
  output,
2204
2162
  parsedBody: parsedBody.Error,
2205
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
2206
2163
  errorCode,
2207
2164
  });
2208
2165
  };
@@ -2217,7 +2174,7 @@ const de_ListStacksCommand = async (output, context) => {
2217
2174
  $metadata: deserializeMetadata(output),
2218
2175
  ...contents,
2219
2176
  };
2220
- return Promise.resolve(response);
2177
+ return response;
2221
2178
  };
2222
2179
  exports.de_ListStacksCommand = de_ListStacksCommand;
2223
2180
  const de_ListStacksCommandError = async (output, context) => {
@@ -2227,10 +2184,9 @@ const de_ListStacksCommandError = async (output, context) => {
2227
2184
  };
2228
2185
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
2229
2186
  const parsedBody = parsedOutput.body;
2230
- (0, smithy_client_1.throwDefaultError)({
2187
+ return throwDefaultError({
2231
2188
  output,
2232
2189
  parsedBody: parsedBody.Error,
2233
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
2234
2190
  errorCode,
2235
2191
  });
2236
2192
  };
@@ -2245,7 +2201,7 @@ const de_ListStackSetOperationResultsCommand = async (output, context) => {
2245
2201
  $metadata: deserializeMetadata(output),
2246
2202
  ...contents,
2247
2203
  };
2248
- return Promise.resolve(response);
2204
+ return response;
2249
2205
  };
2250
2206
  exports.de_ListStackSetOperationResultsCommand = de_ListStackSetOperationResultsCommand;
2251
2207
  const de_ListStackSetOperationResultsCommandError = async (output, context) => {
@@ -2263,10 +2219,9 @@ const de_ListStackSetOperationResultsCommandError = async (output, context) => {
2263
2219
  throw await de_StackSetNotFoundExceptionRes(parsedOutput, context);
2264
2220
  default:
2265
2221
  const parsedBody = parsedOutput.body;
2266
- (0, smithy_client_1.throwDefaultError)({
2222
+ return throwDefaultError({
2267
2223
  output,
2268
2224
  parsedBody: parsedBody.Error,
2269
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
2270
2225
  errorCode,
2271
2226
  });
2272
2227
  }
@@ -2282,7 +2237,7 @@ const de_ListStackSetOperationsCommand = async (output, context) => {
2282
2237
  $metadata: deserializeMetadata(output),
2283
2238
  ...contents,
2284
2239
  };
2285
- return Promise.resolve(response);
2240
+ return response;
2286
2241
  };
2287
2242
  exports.de_ListStackSetOperationsCommand = de_ListStackSetOperationsCommand;
2288
2243
  const de_ListStackSetOperationsCommandError = async (output, context) => {
@@ -2297,10 +2252,9 @@ const de_ListStackSetOperationsCommandError = async (output, context) => {
2297
2252
  throw await de_StackSetNotFoundExceptionRes(parsedOutput, context);
2298
2253
  default:
2299
2254
  const parsedBody = parsedOutput.body;
2300
- (0, smithy_client_1.throwDefaultError)({
2255
+ return throwDefaultError({
2301
2256
  output,
2302
2257
  parsedBody: parsedBody.Error,
2303
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
2304
2258
  errorCode,
2305
2259
  });
2306
2260
  }
@@ -2316,7 +2270,7 @@ const de_ListStackSetsCommand = async (output, context) => {
2316
2270
  $metadata: deserializeMetadata(output),
2317
2271
  ...contents,
2318
2272
  };
2319
- return Promise.resolve(response);
2273
+ return response;
2320
2274
  };
2321
2275
  exports.de_ListStackSetsCommand = de_ListStackSetsCommand;
2322
2276
  const de_ListStackSetsCommandError = async (output, context) => {
@@ -2326,10 +2280,9 @@ const de_ListStackSetsCommandError = async (output, context) => {
2326
2280
  };
2327
2281
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
2328
2282
  const parsedBody = parsedOutput.body;
2329
- (0, smithy_client_1.throwDefaultError)({
2283
+ return throwDefaultError({
2330
2284
  output,
2331
2285
  parsedBody: parsedBody.Error,
2332
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
2333
2286
  errorCode,
2334
2287
  });
2335
2288
  };
@@ -2344,7 +2297,7 @@ const de_ListTypeRegistrationsCommand = async (output, context) => {
2344
2297
  $metadata: deserializeMetadata(output),
2345
2298
  ...contents,
2346
2299
  };
2347
- return Promise.resolve(response);
2300
+ return response;
2348
2301
  };
2349
2302
  exports.de_ListTypeRegistrationsCommand = de_ListTypeRegistrationsCommand;
2350
2303
  const de_ListTypeRegistrationsCommandError = async (output, context) => {
@@ -2359,10 +2312,9 @@ const de_ListTypeRegistrationsCommandError = async (output, context) => {
2359
2312
  throw await de_CFNRegistryExceptionRes(parsedOutput, context);
2360
2313
  default:
2361
2314
  const parsedBody = parsedOutput.body;
2362
- (0, smithy_client_1.throwDefaultError)({
2315
+ return throwDefaultError({
2363
2316
  output,
2364
2317
  parsedBody: parsedBody.Error,
2365
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
2366
2318
  errorCode,
2367
2319
  });
2368
2320
  }
@@ -2378,7 +2330,7 @@ const de_ListTypesCommand = async (output, context) => {
2378
2330
  $metadata: deserializeMetadata(output),
2379
2331
  ...contents,
2380
2332
  };
2381
- return Promise.resolve(response);
2333
+ return response;
2382
2334
  };
2383
2335
  exports.de_ListTypesCommand = de_ListTypesCommand;
2384
2336
  const de_ListTypesCommandError = async (output, context) => {
@@ -2393,10 +2345,9 @@ const de_ListTypesCommandError = async (output, context) => {
2393
2345
  throw await de_CFNRegistryExceptionRes(parsedOutput, context);
2394
2346
  default:
2395
2347
  const parsedBody = parsedOutput.body;
2396
- (0, smithy_client_1.throwDefaultError)({
2348
+ return throwDefaultError({
2397
2349
  output,
2398
2350
  parsedBody: parsedBody.Error,
2399
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
2400
2351
  errorCode,
2401
2352
  });
2402
2353
  }
@@ -2412,7 +2363,7 @@ const de_ListTypeVersionsCommand = async (output, context) => {
2412
2363
  $metadata: deserializeMetadata(output),
2413
2364
  ...contents,
2414
2365
  };
2415
- return Promise.resolve(response);
2366
+ return response;
2416
2367
  };
2417
2368
  exports.de_ListTypeVersionsCommand = de_ListTypeVersionsCommand;
2418
2369
  const de_ListTypeVersionsCommandError = async (output, context) => {
@@ -2427,10 +2378,9 @@ const de_ListTypeVersionsCommandError = async (output, context) => {
2427
2378
  throw await de_CFNRegistryExceptionRes(parsedOutput, context);
2428
2379
  default:
2429
2380
  const parsedBody = parsedOutput.body;
2430
- (0, smithy_client_1.throwDefaultError)({
2381
+ return throwDefaultError({
2431
2382
  output,
2432
2383
  parsedBody: parsedBody.Error,
2433
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
2434
2384
  errorCode,
2435
2385
  });
2436
2386
  }
@@ -2446,7 +2396,7 @@ const de_PublishTypeCommand = async (output, context) => {
2446
2396
  $metadata: deserializeMetadata(output),
2447
2397
  ...contents,
2448
2398
  };
2449
- return Promise.resolve(response);
2399
+ return response;
2450
2400
  };
2451
2401
  exports.de_PublishTypeCommand = de_PublishTypeCommand;
2452
2402
  const de_PublishTypeCommandError = async (output, context) => {
@@ -2464,10 +2414,9 @@ const de_PublishTypeCommandError = async (output, context) => {
2464
2414
  throw await de_TypeNotFoundExceptionRes(parsedOutput, context);
2465
2415
  default:
2466
2416
  const parsedBody = parsedOutput.body;
2467
- (0, smithy_client_1.throwDefaultError)({
2417
+ return throwDefaultError({
2468
2418
  output,
2469
2419
  parsedBody: parsedBody.Error,
2470
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
2471
2420
  errorCode,
2472
2421
  });
2473
2422
  }
@@ -2483,7 +2432,7 @@ const de_RecordHandlerProgressCommand = async (output, context) => {
2483
2432
  $metadata: deserializeMetadata(output),
2484
2433
  ...contents,
2485
2434
  };
2486
- return Promise.resolve(response);
2435
+ return response;
2487
2436
  };
2488
2437
  exports.de_RecordHandlerProgressCommand = de_RecordHandlerProgressCommand;
2489
2438
  const de_RecordHandlerProgressCommandError = async (output, context) => {
@@ -2501,10 +2450,9 @@ const de_RecordHandlerProgressCommandError = async (output, context) => {
2501
2450
  throw await de_InvalidStateTransitionExceptionRes(parsedOutput, context);
2502
2451
  default:
2503
2452
  const parsedBody = parsedOutput.body;
2504
- (0, smithy_client_1.throwDefaultError)({
2453
+ return throwDefaultError({
2505
2454
  output,
2506
2455
  parsedBody: parsedBody.Error,
2507
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
2508
2456
  errorCode,
2509
2457
  });
2510
2458
  }
@@ -2520,7 +2468,7 @@ const de_RegisterPublisherCommand = async (output, context) => {
2520
2468
  $metadata: deserializeMetadata(output),
2521
2469
  ...contents,
2522
2470
  };
2523
- return Promise.resolve(response);
2471
+ return response;
2524
2472
  };
2525
2473
  exports.de_RegisterPublisherCommand = de_RegisterPublisherCommand;
2526
2474
  const de_RegisterPublisherCommandError = async (output, context) => {
@@ -2535,10 +2483,9 @@ const de_RegisterPublisherCommandError = async (output, context) => {
2535
2483
  throw await de_CFNRegistryExceptionRes(parsedOutput, context);
2536
2484
  default:
2537
2485
  const parsedBody = parsedOutput.body;
2538
- (0, smithy_client_1.throwDefaultError)({
2486
+ return throwDefaultError({
2539
2487
  output,
2540
2488
  parsedBody: parsedBody.Error,
2541
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
2542
2489
  errorCode,
2543
2490
  });
2544
2491
  }
@@ -2554,7 +2501,7 @@ const de_RegisterTypeCommand = async (output, context) => {
2554
2501
  $metadata: deserializeMetadata(output),
2555
2502
  ...contents,
2556
2503
  };
2557
- return Promise.resolve(response);
2504
+ return response;
2558
2505
  };
2559
2506
  exports.de_RegisterTypeCommand = de_RegisterTypeCommand;
2560
2507
  const de_RegisterTypeCommandError = async (output, context) => {
@@ -2569,10 +2516,9 @@ const de_RegisterTypeCommandError = async (output, context) => {
2569
2516
  throw await de_CFNRegistryExceptionRes(parsedOutput, context);
2570
2517
  default:
2571
2518
  const parsedBody = parsedOutput.body;
2572
- (0, smithy_client_1.throwDefaultError)({
2519
+ return throwDefaultError({
2573
2520
  output,
2574
2521
  parsedBody: parsedBody.Error,
2575
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
2576
2522
  errorCode,
2577
2523
  });
2578
2524
  }
@@ -2588,7 +2534,7 @@ const de_RollbackStackCommand = async (output, context) => {
2588
2534
  $metadata: deserializeMetadata(output),
2589
2535
  ...contents,
2590
2536
  };
2591
- return Promise.resolve(response);
2537
+ return response;
2592
2538
  };
2593
2539
  exports.de_RollbackStackCommand = de_RollbackStackCommand;
2594
2540
  const de_RollbackStackCommandError = async (output, context) => {
@@ -2603,10 +2549,9 @@ const de_RollbackStackCommandError = async (output, context) => {
2603
2549
  throw await de_TokenAlreadyExistsExceptionRes(parsedOutput, context);
2604
2550
  default:
2605
2551
  const parsedBody = parsedOutput.body;
2606
- (0, smithy_client_1.throwDefaultError)({
2552
+ return throwDefaultError({
2607
2553
  output,
2608
2554
  parsedBody: parsedBody.Error,
2609
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
2610
2555
  errorCode,
2611
2556
  });
2612
2557
  }
@@ -2619,7 +2564,7 @@ const de_SetStackPolicyCommand = async (output, context) => {
2619
2564
  const response = {
2620
2565
  $metadata: deserializeMetadata(output),
2621
2566
  };
2622
- return Promise.resolve(response);
2567
+ return response;
2623
2568
  };
2624
2569
  exports.de_SetStackPolicyCommand = de_SetStackPolicyCommand;
2625
2570
  const de_SetStackPolicyCommandError = async (output, context) => {
@@ -2629,10 +2574,9 @@ const de_SetStackPolicyCommandError = async (output, context) => {
2629
2574
  };
2630
2575
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
2631
2576
  const parsedBody = parsedOutput.body;
2632
- (0, smithy_client_1.throwDefaultError)({
2577
+ return throwDefaultError({
2633
2578
  output,
2634
2579
  parsedBody: parsedBody.Error,
2635
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
2636
2580
  errorCode,
2637
2581
  });
2638
2582
  };
@@ -2647,7 +2591,7 @@ const de_SetTypeConfigurationCommand = async (output, context) => {
2647
2591
  $metadata: deserializeMetadata(output),
2648
2592
  ...contents,
2649
2593
  };
2650
- return Promise.resolve(response);
2594
+ return response;
2651
2595
  };
2652
2596
  exports.de_SetTypeConfigurationCommand = de_SetTypeConfigurationCommand;
2653
2597
  const de_SetTypeConfigurationCommandError = async (output, context) => {
@@ -2665,10 +2609,9 @@ const de_SetTypeConfigurationCommandError = async (output, context) => {
2665
2609
  throw await de_TypeNotFoundExceptionRes(parsedOutput, context);
2666
2610
  default:
2667
2611
  const parsedBody = parsedOutput.body;
2668
- (0, smithy_client_1.throwDefaultError)({
2612
+ return throwDefaultError({
2669
2613
  output,
2670
2614
  parsedBody: parsedBody.Error,
2671
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
2672
2615
  errorCode,
2673
2616
  });
2674
2617
  }
@@ -2684,7 +2627,7 @@ const de_SetTypeDefaultVersionCommand = async (output, context) => {
2684
2627
  $metadata: deserializeMetadata(output),
2685
2628
  ...contents,
2686
2629
  };
2687
- return Promise.resolve(response);
2630
+ return response;
2688
2631
  };
2689
2632
  exports.de_SetTypeDefaultVersionCommand = de_SetTypeDefaultVersionCommand;
2690
2633
  const de_SetTypeDefaultVersionCommandError = async (output, context) => {
@@ -2702,10 +2645,9 @@ const de_SetTypeDefaultVersionCommandError = async (output, context) => {
2702
2645
  throw await de_TypeNotFoundExceptionRes(parsedOutput, context);
2703
2646
  default:
2704
2647
  const parsedBody = parsedOutput.body;
2705
- (0, smithy_client_1.throwDefaultError)({
2648
+ return throwDefaultError({
2706
2649
  output,
2707
2650
  parsedBody: parsedBody.Error,
2708
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
2709
2651
  errorCode,
2710
2652
  });
2711
2653
  }
@@ -2718,7 +2660,7 @@ const de_SignalResourceCommand = async (output, context) => {
2718
2660
  const response = {
2719
2661
  $metadata: deserializeMetadata(output),
2720
2662
  };
2721
- return Promise.resolve(response);
2663
+ return response;
2722
2664
  };
2723
2665
  exports.de_SignalResourceCommand = de_SignalResourceCommand;
2724
2666
  const de_SignalResourceCommandError = async (output, context) => {
@@ -2728,10 +2670,9 @@ const de_SignalResourceCommandError = async (output, context) => {
2728
2670
  };
2729
2671
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
2730
2672
  const parsedBody = parsedOutput.body;
2731
- (0, smithy_client_1.throwDefaultError)({
2673
+ return throwDefaultError({
2732
2674
  output,
2733
2675
  parsedBody: parsedBody.Error,
2734
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
2735
2676
  errorCode,
2736
2677
  });
2737
2678
  };
@@ -2746,7 +2687,7 @@ const de_StopStackSetOperationCommand = async (output, context) => {
2746
2687
  $metadata: deserializeMetadata(output),
2747
2688
  ...contents,
2748
2689
  };
2749
- return Promise.resolve(response);
2690
+ return response;
2750
2691
  };
2751
2692
  exports.de_StopStackSetOperationCommand = de_StopStackSetOperationCommand;
2752
2693
  const de_StopStackSetOperationCommandError = async (output, context) => {
@@ -2767,10 +2708,9 @@ const de_StopStackSetOperationCommandError = async (output, context) => {
2767
2708
  throw await de_StackSetNotFoundExceptionRes(parsedOutput, context);
2768
2709
  default:
2769
2710
  const parsedBody = parsedOutput.body;
2770
- (0, smithy_client_1.throwDefaultError)({
2711
+ return throwDefaultError({
2771
2712
  output,
2772
2713
  parsedBody: parsedBody.Error,
2773
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
2774
2714
  errorCode,
2775
2715
  });
2776
2716
  }
@@ -2786,7 +2726,7 @@ const de_TestTypeCommand = async (output, context) => {
2786
2726
  $metadata: deserializeMetadata(output),
2787
2727
  ...contents,
2788
2728
  };
2789
- return Promise.resolve(response);
2729
+ return response;
2790
2730
  };
2791
2731
  exports.de_TestTypeCommand = de_TestTypeCommand;
2792
2732
  const de_TestTypeCommandError = async (output, context) => {
@@ -2804,10 +2744,9 @@ const de_TestTypeCommandError = async (output, context) => {
2804
2744
  throw await de_TypeNotFoundExceptionRes(parsedOutput, context);
2805
2745
  default:
2806
2746
  const parsedBody = parsedOutput.body;
2807
- (0, smithy_client_1.throwDefaultError)({
2747
+ return throwDefaultError({
2808
2748
  output,
2809
2749
  parsedBody: parsedBody.Error,
2810
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
2811
2750
  errorCode,
2812
2751
  });
2813
2752
  }
@@ -2823,7 +2762,7 @@ const de_UpdateStackCommand = async (output, context) => {
2823
2762
  $metadata: deserializeMetadata(output),
2824
2763
  ...contents,
2825
2764
  };
2826
- return Promise.resolve(response);
2765
+ return response;
2827
2766
  };
2828
2767
  exports.de_UpdateStackCommand = de_UpdateStackCommand;
2829
2768
  const de_UpdateStackCommandError = async (output, context) => {
@@ -2841,10 +2780,9 @@ const de_UpdateStackCommandError = async (output, context) => {
2841
2780
  throw await de_TokenAlreadyExistsExceptionRes(parsedOutput, context);
2842
2781
  default:
2843
2782
  const parsedBody = parsedOutput.body;
2844
- (0, smithy_client_1.throwDefaultError)({
2783
+ return throwDefaultError({
2845
2784
  output,
2846
2785
  parsedBody: parsedBody.Error,
2847
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
2848
2786
  errorCode,
2849
2787
  });
2850
2788
  }
@@ -2860,7 +2798,7 @@ const de_UpdateStackInstancesCommand = async (output, context) => {
2860
2798
  $metadata: deserializeMetadata(output),
2861
2799
  ...contents,
2862
2800
  };
2863
- return Promise.resolve(response);
2801
+ return response;
2864
2802
  };
2865
2803
  exports.de_UpdateStackInstancesCommand = de_UpdateStackInstancesCommand;
2866
2804
  const de_UpdateStackInstancesCommandError = async (output, context) => {
@@ -2890,10 +2828,9 @@ const de_UpdateStackInstancesCommandError = async (output, context) => {
2890
2828
  throw await de_StaleRequestExceptionRes(parsedOutput, context);
2891
2829
  default:
2892
2830
  const parsedBody = parsedOutput.body;
2893
- (0, smithy_client_1.throwDefaultError)({
2831
+ return throwDefaultError({
2894
2832
  output,
2895
2833
  parsedBody: parsedBody.Error,
2896
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
2897
2834
  errorCode,
2898
2835
  });
2899
2836
  }
@@ -2909,7 +2846,7 @@ const de_UpdateStackSetCommand = async (output, context) => {
2909
2846
  $metadata: deserializeMetadata(output),
2910
2847
  ...contents,
2911
2848
  };
2912
- return Promise.resolve(response);
2849
+ return response;
2913
2850
  };
2914
2851
  exports.de_UpdateStackSetCommand = de_UpdateStackSetCommand;
2915
2852
  const de_UpdateStackSetCommandError = async (output, context) => {
@@ -2939,10 +2876,9 @@ const de_UpdateStackSetCommandError = async (output, context) => {
2939
2876
  throw await de_StaleRequestExceptionRes(parsedOutput, context);
2940
2877
  default:
2941
2878
  const parsedBody = parsedOutput.body;
2942
- (0, smithy_client_1.throwDefaultError)({
2879
+ return throwDefaultError({
2943
2880
  output,
2944
2881
  parsedBody: parsedBody.Error,
2945
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
2946
2882
  errorCode,
2947
2883
  });
2948
2884
  }
@@ -2958,7 +2894,7 @@ const de_UpdateTerminationProtectionCommand = async (output, context) => {
2958
2894
  $metadata: deserializeMetadata(output),
2959
2895
  ...contents,
2960
2896
  };
2961
- return Promise.resolve(response);
2897
+ return response;
2962
2898
  };
2963
2899
  exports.de_UpdateTerminationProtectionCommand = de_UpdateTerminationProtectionCommand;
2964
2900
  const de_UpdateTerminationProtectionCommandError = async (output, context) => {
@@ -2968,10 +2904,9 @@ const de_UpdateTerminationProtectionCommandError = async (output, context) => {
2968
2904
  };
2969
2905
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
2970
2906
  const parsedBody = parsedOutput.body;
2971
- (0, smithy_client_1.throwDefaultError)({
2907
+ return throwDefaultError({
2972
2908
  output,
2973
2909
  parsedBody: parsedBody.Error,
2974
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
2975
2910
  errorCode,
2976
2911
  });
2977
2912
  };
@@ -2986,7 +2921,7 @@ const de_ValidateTemplateCommand = async (output, context) => {
2986
2921
  $metadata: deserializeMetadata(output),
2987
2922
  ...contents,
2988
2923
  };
2989
- return Promise.resolve(response);
2924
+ return response;
2990
2925
  };
2991
2926
  exports.de_ValidateTemplateCommand = de_ValidateTemplateCommand;
2992
2927
  const de_ValidateTemplateCommandError = async (output, context) => {
@@ -2996,10 +2931,9 @@ const de_ValidateTemplateCommandError = async (output, context) => {
2996
2931
  };
2997
2932
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
2998
2933
  const parsedBody = parsedOutput.body;
2999
- (0, smithy_client_1.throwDefaultError)({
2934
+ return throwDefaultError({
3000
2935
  output,
3001
2936
  parsedBody: parsedBody.Error,
3002
- exceptionCtor: CloudFormationServiceException_1.CloudFormationServiceException,
3003
2937
  errorCode,
3004
2938
  });
3005
2939
  };
@@ -7828,6 +7762,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
7828
7762
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
7829
7763
  };
7830
7764
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
7765
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(CloudFormationServiceException_1.CloudFormationServiceException);
7831
7766
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
7832
7767
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
7833
7768
  const contents = {