@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.
@@ -1,5 +1,5 @@
1
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
- import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, getArrayIfSingleItem as __getArrayIfSingleItem, getValueFromTextNode as __getValueFromTextNode, parseBoolean as __parseBoolean, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, strictParseInt32 as __strictParseInt32, throwDefaultError, } from "@aws-sdk/smithy-client";
2
+ import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, getArrayIfSingleItem as __getArrayIfSingleItem, getValueFromTextNode as __getValueFromTextNode, parseBoolean as __parseBoolean, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, strictParseInt32 as __strictParseInt32, withBaseException, } from "@aws-sdk/smithy-client";
3
3
  import { XMLParser } from "fast-xml-parser";
4
4
  import { v4 as generateIdempotencyToken } from "uuid";
5
5
  import { CloudFormationServiceException as __BaseException } from "../models/CloudFormationServiceException";
@@ -675,7 +675,7 @@ export const de_ActivateTypeCommand = async (output, context) => {
675
675
  $metadata: deserializeMetadata(output),
676
676
  ...contents,
677
677
  };
678
- return Promise.resolve(response);
678
+ return response;
679
679
  };
680
680
  const de_ActivateTypeCommandError = async (output, context) => {
681
681
  const parsedOutput = {
@@ -692,10 +692,9 @@ const de_ActivateTypeCommandError = async (output, context) => {
692
692
  throw await de_TypeNotFoundExceptionRes(parsedOutput, context);
693
693
  default:
694
694
  const parsedBody = parsedOutput.body;
695
- throwDefaultError({
695
+ return throwDefaultError({
696
696
  output,
697
697
  parsedBody: parsedBody.Error,
698
- exceptionCtor: __BaseException,
699
698
  errorCode,
700
699
  });
701
700
  }
@@ -711,7 +710,7 @@ export const de_BatchDescribeTypeConfigurationsCommand = async (output, context)
711
710
  $metadata: deserializeMetadata(output),
712
711
  ...contents,
713
712
  };
714
- return Promise.resolve(response);
713
+ return response;
715
714
  };
716
715
  const de_BatchDescribeTypeConfigurationsCommandError = async (output, context) => {
717
716
  const parsedOutput = {
@@ -728,10 +727,9 @@ const de_BatchDescribeTypeConfigurationsCommandError = async (output, context) =
728
727
  throw await de_TypeConfigurationNotFoundExceptionRes(parsedOutput, context);
729
728
  default:
730
729
  const parsedBody = parsedOutput.body;
731
- throwDefaultError({
730
+ return throwDefaultError({
732
731
  output,
733
732
  parsedBody: parsedBody.Error,
734
- exceptionCtor: __BaseException,
735
733
  errorCode,
736
734
  });
737
735
  }
@@ -744,7 +742,7 @@ export const de_CancelUpdateStackCommand = async (output, context) => {
744
742
  const response = {
745
743
  $metadata: deserializeMetadata(output),
746
744
  };
747
- return Promise.resolve(response);
745
+ return response;
748
746
  };
749
747
  const de_CancelUpdateStackCommandError = async (output, context) => {
750
748
  const parsedOutput = {
@@ -758,10 +756,9 @@ const de_CancelUpdateStackCommandError = async (output, context) => {
758
756
  throw await de_TokenAlreadyExistsExceptionRes(parsedOutput, context);
759
757
  default:
760
758
  const parsedBody = parsedOutput.body;
761
- throwDefaultError({
759
+ return throwDefaultError({
762
760
  output,
763
761
  parsedBody: parsedBody.Error,
764
- exceptionCtor: __BaseException,
765
762
  errorCode,
766
763
  });
767
764
  }
@@ -777,7 +774,7 @@ export const de_ContinueUpdateRollbackCommand = async (output, context) => {
777
774
  $metadata: deserializeMetadata(output),
778
775
  ...contents,
779
776
  };
780
- return Promise.resolve(response);
777
+ return response;
781
778
  };
782
779
  const de_ContinueUpdateRollbackCommandError = async (output, context) => {
783
780
  const parsedOutput = {
@@ -791,10 +788,9 @@ const de_ContinueUpdateRollbackCommandError = async (output, context) => {
791
788
  throw await de_TokenAlreadyExistsExceptionRes(parsedOutput, context);
792
789
  default:
793
790
  const parsedBody = parsedOutput.body;
794
- throwDefaultError({
791
+ return throwDefaultError({
795
792
  output,
796
793
  parsedBody: parsedBody.Error,
797
- exceptionCtor: __BaseException,
798
794
  errorCode,
799
795
  });
800
796
  }
@@ -810,7 +806,7 @@ export const de_CreateChangeSetCommand = async (output, context) => {
810
806
  $metadata: deserializeMetadata(output),
811
807
  ...contents,
812
808
  };
813
- return Promise.resolve(response);
809
+ return response;
814
810
  };
815
811
  const de_CreateChangeSetCommandError = async (output, context) => {
816
812
  const parsedOutput = {
@@ -830,10 +826,9 @@ const de_CreateChangeSetCommandError = async (output, context) => {
830
826
  throw await de_LimitExceededExceptionRes(parsedOutput, context);
831
827
  default:
832
828
  const parsedBody = parsedOutput.body;
833
- throwDefaultError({
829
+ return throwDefaultError({
834
830
  output,
835
831
  parsedBody: parsedBody.Error,
836
- exceptionCtor: __BaseException,
837
832
  errorCode,
838
833
  });
839
834
  }
@@ -849,7 +844,7 @@ export const de_CreateStackCommand = async (output, context) => {
849
844
  $metadata: deserializeMetadata(output),
850
845
  ...contents,
851
846
  };
852
- return Promise.resolve(response);
847
+ return response;
853
848
  };
854
849
  const de_CreateStackCommandError = async (output, context) => {
855
850
  const parsedOutput = {
@@ -872,10 +867,9 @@ const de_CreateStackCommandError = async (output, context) => {
872
867
  throw await de_TokenAlreadyExistsExceptionRes(parsedOutput, context);
873
868
  default:
874
869
  const parsedBody = parsedOutput.body;
875
- throwDefaultError({
870
+ return throwDefaultError({
876
871
  output,
877
872
  parsedBody: parsedBody.Error,
878
- exceptionCtor: __BaseException,
879
873
  errorCode,
880
874
  });
881
875
  }
@@ -891,7 +885,7 @@ export const de_CreateStackInstancesCommand = async (output, context) => {
891
885
  $metadata: deserializeMetadata(output),
892
886
  ...contents,
893
887
  };
894
- return Promise.resolve(response);
888
+ return response;
895
889
  };
896
890
  const de_CreateStackInstancesCommandError = async (output, context) => {
897
891
  const parsedOutput = {
@@ -920,10 +914,9 @@ const de_CreateStackInstancesCommandError = async (output, context) => {
920
914
  throw await de_StaleRequestExceptionRes(parsedOutput, context);
921
915
  default:
922
916
  const parsedBody = parsedOutput.body;
923
- throwDefaultError({
917
+ return throwDefaultError({
924
918
  output,
925
919
  parsedBody: parsedBody.Error,
926
- exceptionCtor: __BaseException,
927
920
  errorCode,
928
921
  });
929
922
  }
@@ -939,7 +932,7 @@ export const de_CreateStackSetCommand = async (output, context) => {
939
932
  $metadata: deserializeMetadata(output),
940
933
  ...contents,
941
934
  };
942
- return Promise.resolve(response);
935
+ return response;
943
936
  };
944
937
  const de_CreateStackSetCommandError = async (output, context) => {
945
938
  const parsedOutput = {
@@ -959,10 +952,9 @@ const de_CreateStackSetCommandError = async (output, context) => {
959
952
  throw await de_NameAlreadyExistsExceptionRes(parsedOutput, context);
960
953
  default:
961
954
  const parsedBody = parsedOutput.body;
962
- throwDefaultError({
955
+ return throwDefaultError({
963
956
  output,
964
957
  parsedBody: parsedBody.Error,
965
- exceptionCtor: __BaseException,
966
958
  errorCode,
967
959
  });
968
960
  }
@@ -978,7 +970,7 @@ export const de_DeactivateTypeCommand = async (output, context) => {
978
970
  $metadata: deserializeMetadata(output),
979
971
  ...contents,
980
972
  };
981
- return Promise.resolve(response);
973
+ return response;
982
974
  };
983
975
  const de_DeactivateTypeCommandError = async (output, context) => {
984
976
  const parsedOutput = {
@@ -995,10 +987,9 @@ const de_DeactivateTypeCommandError = async (output, context) => {
995
987
  throw await de_TypeNotFoundExceptionRes(parsedOutput, context);
996
988
  default:
997
989
  const parsedBody = parsedOutput.body;
998
- throwDefaultError({
990
+ return throwDefaultError({
999
991
  output,
1000
992
  parsedBody: parsedBody.Error,
1001
- exceptionCtor: __BaseException,
1002
993
  errorCode,
1003
994
  });
1004
995
  }
@@ -1014,7 +1005,7 @@ export const de_DeleteChangeSetCommand = async (output, context) => {
1014
1005
  $metadata: deserializeMetadata(output),
1015
1006
  ...contents,
1016
1007
  };
1017
- return Promise.resolve(response);
1008
+ return response;
1018
1009
  };
1019
1010
  const de_DeleteChangeSetCommandError = async (output, context) => {
1020
1011
  const parsedOutput = {
@@ -1028,10 +1019,9 @@ const de_DeleteChangeSetCommandError = async (output, context) => {
1028
1019
  throw await de_InvalidChangeSetStatusExceptionRes(parsedOutput, context);
1029
1020
  default:
1030
1021
  const parsedBody = parsedOutput.body;
1031
- throwDefaultError({
1022
+ return throwDefaultError({
1032
1023
  output,
1033
1024
  parsedBody: parsedBody.Error,
1034
- exceptionCtor: __BaseException,
1035
1025
  errorCode,
1036
1026
  });
1037
1027
  }
@@ -1044,7 +1034,7 @@ export const de_DeleteStackCommand = async (output, context) => {
1044
1034
  const response = {
1045
1035
  $metadata: deserializeMetadata(output),
1046
1036
  };
1047
- return Promise.resolve(response);
1037
+ return response;
1048
1038
  };
1049
1039
  const de_DeleteStackCommandError = async (output, context) => {
1050
1040
  const parsedOutput = {
@@ -1058,10 +1048,9 @@ const de_DeleteStackCommandError = async (output, context) => {
1058
1048
  throw await de_TokenAlreadyExistsExceptionRes(parsedOutput, context);
1059
1049
  default:
1060
1050
  const parsedBody = parsedOutput.body;
1061
- throwDefaultError({
1051
+ return throwDefaultError({
1062
1052
  output,
1063
1053
  parsedBody: parsedBody.Error,
1064
- exceptionCtor: __BaseException,
1065
1054
  errorCode,
1066
1055
  });
1067
1056
  }
@@ -1077,7 +1066,7 @@ export const de_DeleteStackInstancesCommand = async (output, context) => {
1077
1066
  $metadata: deserializeMetadata(output),
1078
1067
  ...contents,
1079
1068
  };
1080
- return Promise.resolve(response);
1069
+ return response;
1081
1070
  };
1082
1071
  const de_DeleteStackInstancesCommandError = async (output, context) => {
1083
1072
  const parsedOutput = {
@@ -1103,10 +1092,9 @@ const de_DeleteStackInstancesCommandError = async (output, context) => {
1103
1092
  throw await de_StaleRequestExceptionRes(parsedOutput, context);
1104
1093
  default:
1105
1094
  const parsedBody = parsedOutput.body;
1106
- throwDefaultError({
1095
+ return throwDefaultError({
1107
1096
  output,
1108
1097
  parsedBody: parsedBody.Error,
1109
- exceptionCtor: __BaseException,
1110
1098
  errorCode,
1111
1099
  });
1112
1100
  }
@@ -1122,7 +1110,7 @@ export const de_DeleteStackSetCommand = async (output, context) => {
1122
1110
  $metadata: deserializeMetadata(output),
1123
1111
  ...contents,
1124
1112
  };
1125
- return Promise.resolve(response);
1113
+ return response;
1126
1114
  };
1127
1115
  const de_DeleteStackSetCommandError = async (output, context) => {
1128
1116
  const parsedOutput = {
@@ -1139,10 +1127,9 @@ const de_DeleteStackSetCommandError = async (output, context) => {
1139
1127
  throw await de_StackSetNotEmptyExceptionRes(parsedOutput, context);
1140
1128
  default:
1141
1129
  const parsedBody = parsedOutput.body;
1142
- throwDefaultError({
1130
+ return throwDefaultError({
1143
1131
  output,
1144
1132
  parsedBody: parsedBody.Error,
1145
- exceptionCtor: __BaseException,
1146
1133
  errorCode,
1147
1134
  });
1148
1135
  }
@@ -1158,7 +1145,7 @@ export const de_DeregisterTypeCommand = async (output, context) => {
1158
1145
  $metadata: deserializeMetadata(output),
1159
1146
  ...contents,
1160
1147
  };
1161
- return Promise.resolve(response);
1148
+ return response;
1162
1149
  };
1163
1150
  const de_DeregisterTypeCommandError = async (output, context) => {
1164
1151
  const parsedOutput = {
@@ -1175,10 +1162,9 @@ const de_DeregisterTypeCommandError = async (output, context) => {
1175
1162
  throw await de_TypeNotFoundExceptionRes(parsedOutput, context);
1176
1163
  default:
1177
1164
  const parsedBody = parsedOutput.body;
1178
- throwDefaultError({
1165
+ return throwDefaultError({
1179
1166
  output,
1180
1167
  parsedBody: parsedBody.Error,
1181
- exceptionCtor: __BaseException,
1182
1168
  errorCode,
1183
1169
  });
1184
1170
  }
@@ -1194,7 +1180,7 @@ export const de_DescribeAccountLimitsCommand = async (output, context) => {
1194
1180
  $metadata: deserializeMetadata(output),
1195
1181
  ...contents,
1196
1182
  };
1197
- return Promise.resolve(response);
1183
+ return response;
1198
1184
  };
1199
1185
  const de_DescribeAccountLimitsCommandError = async (output, context) => {
1200
1186
  const parsedOutput = {
@@ -1203,10 +1189,9 @@ const de_DescribeAccountLimitsCommandError = async (output, context) => {
1203
1189
  };
1204
1190
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1205
1191
  const parsedBody = parsedOutput.body;
1206
- throwDefaultError({
1192
+ return throwDefaultError({
1207
1193
  output,
1208
1194
  parsedBody: parsedBody.Error,
1209
- exceptionCtor: __BaseException,
1210
1195
  errorCode,
1211
1196
  });
1212
1197
  };
@@ -1221,7 +1206,7 @@ export const de_DescribeChangeSetCommand = async (output, context) => {
1221
1206
  $metadata: deserializeMetadata(output),
1222
1207
  ...contents,
1223
1208
  };
1224
- return Promise.resolve(response);
1209
+ return response;
1225
1210
  };
1226
1211
  const de_DescribeChangeSetCommandError = async (output, context) => {
1227
1212
  const parsedOutput = {
@@ -1235,10 +1220,9 @@ const de_DescribeChangeSetCommandError = async (output, context) => {
1235
1220
  throw await de_ChangeSetNotFoundExceptionRes(parsedOutput, context);
1236
1221
  default:
1237
1222
  const parsedBody = parsedOutput.body;
1238
- throwDefaultError({
1223
+ return throwDefaultError({
1239
1224
  output,
1240
1225
  parsedBody: parsedBody.Error,
1241
- exceptionCtor: __BaseException,
1242
1226
  errorCode,
1243
1227
  });
1244
1228
  }
@@ -1254,7 +1238,7 @@ export const de_DescribeChangeSetHooksCommand = async (output, context) => {
1254
1238
  $metadata: deserializeMetadata(output),
1255
1239
  ...contents,
1256
1240
  };
1257
- return Promise.resolve(response);
1241
+ return response;
1258
1242
  };
1259
1243
  const de_DescribeChangeSetHooksCommandError = async (output, context) => {
1260
1244
  const parsedOutput = {
@@ -1268,10 +1252,9 @@ const de_DescribeChangeSetHooksCommandError = async (output, context) => {
1268
1252
  throw await de_ChangeSetNotFoundExceptionRes(parsedOutput, context);
1269
1253
  default:
1270
1254
  const parsedBody = parsedOutput.body;
1271
- throwDefaultError({
1255
+ return throwDefaultError({
1272
1256
  output,
1273
1257
  parsedBody: parsedBody.Error,
1274
- exceptionCtor: __BaseException,
1275
1258
  errorCode,
1276
1259
  });
1277
1260
  }
@@ -1287,7 +1270,7 @@ export const de_DescribePublisherCommand = async (output, context) => {
1287
1270
  $metadata: deserializeMetadata(output),
1288
1271
  ...contents,
1289
1272
  };
1290
- return Promise.resolve(response);
1273
+ return response;
1291
1274
  };
1292
1275
  const de_DescribePublisherCommandError = async (output, context) => {
1293
1276
  const parsedOutput = {
@@ -1301,10 +1284,9 @@ const de_DescribePublisherCommandError = async (output, context) => {
1301
1284
  throw await de_CFNRegistryExceptionRes(parsedOutput, context);
1302
1285
  default:
1303
1286
  const parsedBody = parsedOutput.body;
1304
- throwDefaultError({
1287
+ return throwDefaultError({
1305
1288
  output,
1306
1289
  parsedBody: parsedBody.Error,
1307
- exceptionCtor: __BaseException,
1308
1290
  errorCode,
1309
1291
  });
1310
1292
  }
@@ -1320,7 +1302,7 @@ export const de_DescribeStackDriftDetectionStatusCommand = async (output, contex
1320
1302
  $metadata: deserializeMetadata(output),
1321
1303
  ...contents,
1322
1304
  };
1323
- return Promise.resolve(response);
1305
+ return response;
1324
1306
  };
1325
1307
  const de_DescribeStackDriftDetectionStatusCommandError = async (output, context) => {
1326
1308
  const parsedOutput = {
@@ -1329,10 +1311,9 @@ const de_DescribeStackDriftDetectionStatusCommandError = async (output, context)
1329
1311
  };
1330
1312
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1331
1313
  const parsedBody = parsedOutput.body;
1332
- throwDefaultError({
1314
+ return throwDefaultError({
1333
1315
  output,
1334
1316
  parsedBody: parsedBody.Error,
1335
- exceptionCtor: __BaseException,
1336
1317
  errorCode,
1337
1318
  });
1338
1319
  };
@@ -1347,7 +1328,7 @@ export const de_DescribeStackEventsCommand = async (output, context) => {
1347
1328
  $metadata: deserializeMetadata(output),
1348
1329
  ...contents,
1349
1330
  };
1350
- return Promise.resolve(response);
1331
+ return response;
1351
1332
  };
1352
1333
  const de_DescribeStackEventsCommandError = async (output, context) => {
1353
1334
  const parsedOutput = {
@@ -1356,10 +1337,9 @@ const de_DescribeStackEventsCommandError = async (output, context) => {
1356
1337
  };
1357
1338
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1358
1339
  const parsedBody = parsedOutput.body;
1359
- throwDefaultError({
1340
+ return throwDefaultError({
1360
1341
  output,
1361
1342
  parsedBody: parsedBody.Error,
1362
- exceptionCtor: __BaseException,
1363
1343
  errorCode,
1364
1344
  });
1365
1345
  };
@@ -1374,7 +1354,7 @@ export const de_DescribeStackInstanceCommand = async (output, context) => {
1374
1354
  $metadata: deserializeMetadata(output),
1375
1355
  ...contents,
1376
1356
  };
1377
- return Promise.resolve(response);
1357
+ return response;
1378
1358
  };
1379
1359
  const de_DescribeStackInstanceCommandError = async (output, context) => {
1380
1360
  const parsedOutput = {
@@ -1391,10 +1371,9 @@ const de_DescribeStackInstanceCommandError = async (output, context) => {
1391
1371
  throw await de_StackSetNotFoundExceptionRes(parsedOutput, context);
1392
1372
  default:
1393
1373
  const parsedBody = parsedOutput.body;
1394
- throwDefaultError({
1374
+ return throwDefaultError({
1395
1375
  output,
1396
1376
  parsedBody: parsedBody.Error,
1397
- exceptionCtor: __BaseException,
1398
1377
  errorCode,
1399
1378
  });
1400
1379
  }
@@ -1410,7 +1389,7 @@ export const de_DescribeStackResourceCommand = async (output, context) => {
1410
1389
  $metadata: deserializeMetadata(output),
1411
1390
  ...contents,
1412
1391
  };
1413
- return Promise.resolve(response);
1392
+ return response;
1414
1393
  };
1415
1394
  const de_DescribeStackResourceCommandError = async (output, context) => {
1416
1395
  const parsedOutput = {
@@ -1419,10 +1398,9 @@ const de_DescribeStackResourceCommandError = async (output, context) => {
1419
1398
  };
1420
1399
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1421
1400
  const parsedBody = parsedOutput.body;
1422
- throwDefaultError({
1401
+ return throwDefaultError({
1423
1402
  output,
1424
1403
  parsedBody: parsedBody.Error,
1425
- exceptionCtor: __BaseException,
1426
1404
  errorCode,
1427
1405
  });
1428
1406
  };
@@ -1437,7 +1415,7 @@ export const de_DescribeStackResourceDriftsCommand = async (output, context) =>
1437
1415
  $metadata: deserializeMetadata(output),
1438
1416
  ...contents,
1439
1417
  };
1440
- return Promise.resolve(response);
1418
+ return response;
1441
1419
  };
1442
1420
  const de_DescribeStackResourceDriftsCommandError = async (output, context) => {
1443
1421
  const parsedOutput = {
@@ -1446,10 +1424,9 @@ const de_DescribeStackResourceDriftsCommandError = async (output, context) => {
1446
1424
  };
1447
1425
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1448
1426
  const parsedBody = parsedOutput.body;
1449
- throwDefaultError({
1427
+ return throwDefaultError({
1450
1428
  output,
1451
1429
  parsedBody: parsedBody.Error,
1452
- exceptionCtor: __BaseException,
1453
1430
  errorCode,
1454
1431
  });
1455
1432
  };
@@ -1464,7 +1441,7 @@ export const de_DescribeStackResourcesCommand = async (output, context) => {
1464
1441
  $metadata: deserializeMetadata(output),
1465
1442
  ...contents,
1466
1443
  };
1467
- return Promise.resolve(response);
1444
+ return response;
1468
1445
  };
1469
1446
  const de_DescribeStackResourcesCommandError = async (output, context) => {
1470
1447
  const parsedOutput = {
@@ -1473,10 +1450,9 @@ const de_DescribeStackResourcesCommandError = async (output, context) => {
1473
1450
  };
1474
1451
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1475
1452
  const parsedBody = parsedOutput.body;
1476
- throwDefaultError({
1453
+ return throwDefaultError({
1477
1454
  output,
1478
1455
  parsedBody: parsedBody.Error,
1479
- exceptionCtor: __BaseException,
1480
1456
  errorCode,
1481
1457
  });
1482
1458
  };
@@ -1491,7 +1467,7 @@ export const de_DescribeStacksCommand = async (output, context) => {
1491
1467
  $metadata: deserializeMetadata(output),
1492
1468
  ...contents,
1493
1469
  };
1494
- return Promise.resolve(response);
1470
+ return response;
1495
1471
  };
1496
1472
  const de_DescribeStacksCommandError = async (output, context) => {
1497
1473
  const parsedOutput = {
@@ -1500,10 +1476,9 @@ const de_DescribeStacksCommandError = async (output, context) => {
1500
1476
  };
1501
1477
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1502
1478
  const parsedBody = parsedOutput.body;
1503
- throwDefaultError({
1479
+ return throwDefaultError({
1504
1480
  output,
1505
1481
  parsedBody: parsedBody.Error,
1506
- exceptionCtor: __BaseException,
1507
1482
  errorCode,
1508
1483
  });
1509
1484
  };
@@ -1518,7 +1493,7 @@ export const de_DescribeStackSetCommand = async (output, context) => {
1518
1493
  $metadata: deserializeMetadata(output),
1519
1494
  ...contents,
1520
1495
  };
1521
- return Promise.resolve(response);
1496
+ return response;
1522
1497
  };
1523
1498
  const de_DescribeStackSetCommandError = async (output, context) => {
1524
1499
  const parsedOutput = {
@@ -1532,10 +1507,9 @@ const de_DescribeStackSetCommandError = async (output, context) => {
1532
1507
  throw await de_StackSetNotFoundExceptionRes(parsedOutput, context);
1533
1508
  default:
1534
1509
  const parsedBody = parsedOutput.body;
1535
- throwDefaultError({
1510
+ return throwDefaultError({
1536
1511
  output,
1537
1512
  parsedBody: parsedBody.Error,
1538
- exceptionCtor: __BaseException,
1539
1513
  errorCode,
1540
1514
  });
1541
1515
  }
@@ -1551,7 +1525,7 @@ export const de_DescribeStackSetOperationCommand = async (output, context) => {
1551
1525
  $metadata: deserializeMetadata(output),
1552
1526
  ...contents,
1553
1527
  };
1554
- return Promise.resolve(response);
1528
+ return response;
1555
1529
  };
1556
1530
  const de_DescribeStackSetOperationCommandError = async (output, context) => {
1557
1531
  const parsedOutput = {
@@ -1568,10 +1542,9 @@ const de_DescribeStackSetOperationCommandError = async (output, context) => {
1568
1542
  throw await de_StackSetNotFoundExceptionRes(parsedOutput, context);
1569
1543
  default:
1570
1544
  const parsedBody = parsedOutput.body;
1571
- throwDefaultError({
1545
+ return throwDefaultError({
1572
1546
  output,
1573
1547
  parsedBody: parsedBody.Error,
1574
- exceptionCtor: __BaseException,
1575
1548
  errorCode,
1576
1549
  });
1577
1550
  }
@@ -1587,7 +1560,7 @@ export const de_DescribeTypeCommand = async (output, context) => {
1587
1560
  $metadata: deserializeMetadata(output),
1588
1561
  ...contents,
1589
1562
  };
1590
- return Promise.resolve(response);
1563
+ return response;
1591
1564
  };
1592
1565
  const de_DescribeTypeCommandError = async (output, context) => {
1593
1566
  const parsedOutput = {
@@ -1604,10 +1577,9 @@ const de_DescribeTypeCommandError = async (output, context) => {
1604
1577
  throw await de_TypeNotFoundExceptionRes(parsedOutput, context);
1605
1578
  default:
1606
1579
  const parsedBody = parsedOutput.body;
1607
- throwDefaultError({
1580
+ return throwDefaultError({
1608
1581
  output,
1609
1582
  parsedBody: parsedBody.Error,
1610
- exceptionCtor: __BaseException,
1611
1583
  errorCode,
1612
1584
  });
1613
1585
  }
@@ -1623,7 +1595,7 @@ export const de_DescribeTypeRegistrationCommand = async (output, context) => {
1623
1595
  $metadata: deserializeMetadata(output),
1624
1596
  ...contents,
1625
1597
  };
1626
- return Promise.resolve(response);
1598
+ return response;
1627
1599
  };
1628
1600
  const de_DescribeTypeRegistrationCommandError = async (output, context) => {
1629
1601
  const parsedOutput = {
@@ -1637,10 +1609,9 @@ const de_DescribeTypeRegistrationCommandError = async (output, context) => {
1637
1609
  throw await de_CFNRegistryExceptionRes(parsedOutput, context);
1638
1610
  default:
1639
1611
  const parsedBody = parsedOutput.body;
1640
- throwDefaultError({
1612
+ return throwDefaultError({
1641
1613
  output,
1642
1614
  parsedBody: parsedBody.Error,
1643
- exceptionCtor: __BaseException,
1644
1615
  errorCode,
1645
1616
  });
1646
1617
  }
@@ -1656,7 +1627,7 @@ export const de_DetectStackDriftCommand = async (output, context) => {
1656
1627
  $metadata: deserializeMetadata(output),
1657
1628
  ...contents,
1658
1629
  };
1659
- return Promise.resolve(response);
1630
+ return response;
1660
1631
  };
1661
1632
  const de_DetectStackDriftCommandError = async (output, context) => {
1662
1633
  const parsedOutput = {
@@ -1665,10 +1636,9 @@ const de_DetectStackDriftCommandError = async (output, context) => {
1665
1636
  };
1666
1637
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1667
1638
  const parsedBody = parsedOutput.body;
1668
- throwDefaultError({
1639
+ return throwDefaultError({
1669
1640
  output,
1670
1641
  parsedBody: parsedBody.Error,
1671
- exceptionCtor: __BaseException,
1672
1642
  errorCode,
1673
1643
  });
1674
1644
  };
@@ -1683,7 +1653,7 @@ export const de_DetectStackResourceDriftCommand = async (output, context) => {
1683
1653
  $metadata: deserializeMetadata(output),
1684
1654
  ...contents,
1685
1655
  };
1686
- return Promise.resolve(response);
1656
+ return response;
1687
1657
  };
1688
1658
  const de_DetectStackResourceDriftCommandError = async (output, context) => {
1689
1659
  const parsedOutput = {
@@ -1692,10 +1662,9 @@ const de_DetectStackResourceDriftCommandError = async (output, context) => {
1692
1662
  };
1693
1663
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1694
1664
  const parsedBody = parsedOutput.body;
1695
- throwDefaultError({
1665
+ return throwDefaultError({
1696
1666
  output,
1697
1667
  parsedBody: parsedBody.Error,
1698
- exceptionCtor: __BaseException,
1699
1668
  errorCode,
1700
1669
  });
1701
1670
  };
@@ -1710,7 +1679,7 @@ export const de_DetectStackSetDriftCommand = async (output, context) => {
1710
1679
  $metadata: deserializeMetadata(output),
1711
1680
  ...contents,
1712
1681
  };
1713
- return Promise.resolve(response);
1682
+ return response;
1714
1683
  };
1715
1684
  const de_DetectStackSetDriftCommandError = async (output, context) => {
1716
1685
  const parsedOutput = {
@@ -1730,10 +1699,9 @@ const de_DetectStackSetDriftCommandError = async (output, context) => {
1730
1699
  throw await de_StackSetNotFoundExceptionRes(parsedOutput, context);
1731
1700
  default:
1732
1701
  const parsedBody = parsedOutput.body;
1733
- throwDefaultError({
1702
+ return throwDefaultError({
1734
1703
  output,
1735
1704
  parsedBody: parsedBody.Error,
1736
- exceptionCtor: __BaseException,
1737
1705
  errorCode,
1738
1706
  });
1739
1707
  }
@@ -1749,7 +1717,7 @@ export const de_EstimateTemplateCostCommand = async (output, context) => {
1749
1717
  $metadata: deserializeMetadata(output),
1750
1718
  ...contents,
1751
1719
  };
1752
- return Promise.resolve(response);
1720
+ return response;
1753
1721
  };
1754
1722
  const de_EstimateTemplateCostCommandError = async (output, context) => {
1755
1723
  const parsedOutput = {
@@ -1758,10 +1726,9 @@ const de_EstimateTemplateCostCommandError = async (output, context) => {
1758
1726
  };
1759
1727
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1760
1728
  const parsedBody = parsedOutput.body;
1761
- throwDefaultError({
1729
+ return throwDefaultError({
1762
1730
  output,
1763
1731
  parsedBody: parsedBody.Error,
1764
- exceptionCtor: __BaseException,
1765
1732
  errorCode,
1766
1733
  });
1767
1734
  };
@@ -1776,7 +1743,7 @@ export const de_ExecuteChangeSetCommand = async (output, context) => {
1776
1743
  $metadata: deserializeMetadata(output),
1777
1744
  ...contents,
1778
1745
  };
1779
- return Promise.resolve(response);
1746
+ return response;
1780
1747
  };
1781
1748
  const de_ExecuteChangeSetCommandError = async (output, context) => {
1782
1749
  const parsedOutput = {
@@ -1799,10 +1766,9 @@ const de_ExecuteChangeSetCommandError = async (output, context) => {
1799
1766
  throw await de_TokenAlreadyExistsExceptionRes(parsedOutput, context);
1800
1767
  default:
1801
1768
  const parsedBody = parsedOutput.body;
1802
- throwDefaultError({
1769
+ return throwDefaultError({
1803
1770
  output,
1804
1771
  parsedBody: parsedBody.Error,
1805
- exceptionCtor: __BaseException,
1806
1772
  errorCode,
1807
1773
  });
1808
1774
  }
@@ -1818,7 +1784,7 @@ export const de_GetStackPolicyCommand = async (output, context) => {
1818
1784
  $metadata: deserializeMetadata(output),
1819
1785
  ...contents,
1820
1786
  };
1821
- return Promise.resolve(response);
1787
+ return response;
1822
1788
  };
1823
1789
  const de_GetStackPolicyCommandError = async (output, context) => {
1824
1790
  const parsedOutput = {
@@ -1827,10 +1793,9 @@ const de_GetStackPolicyCommandError = async (output, context) => {
1827
1793
  };
1828
1794
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1829
1795
  const parsedBody = parsedOutput.body;
1830
- throwDefaultError({
1796
+ return throwDefaultError({
1831
1797
  output,
1832
1798
  parsedBody: parsedBody.Error,
1833
- exceptionCtor: __BaseException,
1834
1799
  errorCode,
1835
1800
  });
1836
1801
  };
@@ -1845,7 +1810,7 @@ export const de_GetTemplateCommand = async (output, context) => {
1845
1810
  $metadata: deserializeMetadata(output),
1846
1811
  ...contents,
1847
1812
  };
1848
- return Promise.resolve(response);
1813
+ return response;
1849
1814
  };
1850
1815
  const de_GetTemplateCommandError = async (output, context) => {
1851
1816
  const parsedOutput = {
@@ -1859,10 +1824,9 @@ const de_GetTemplateCommandError = async (output, context) => {
1859
1824
  throw await de_ChangeSetNotFoundExceptionRes(parsedOutput, context);
1860
1825
  default:
1861
1826
  const parsedBody = parsedOutput.body;
1862
- throwDefaultError({
1827
+ return throwDefaultError({
1863
1828
  output,
1864
1829
  parsedBody: parsedBody.Error,
1865
- exceptionCtor: __BaseException,
1866
1830
  errorCode,
1867
1831
  });
1868
1832
  }
@@ -1878,7 +1842,7 @@ export const de_GetTemplateSummaryCommand = async (output, context) => {
1878
1842
  $metadata: deserializeMetadata(output),
1879
1843
  ...contents,
1880
1844
  };
1881
- return Promise.resolve(response);
1845
+ return response;
1882
1846
  };
1883
1847
  const de_GetTemplateSummaryCommandError = async (output, context) => {
1884
1848
  const parsedOutput = {
@@ -1892,10 +1856,9 @@ const de_GetTemplateSummaryCommandError = async (output, context) => {
1892
1856
  throw await de_StackSetNotFoundExceptionRes(parsedOutput, context);
1893
1857
  default:
1894
1858
  const parsedBody = parsedOutput.body;
1895
- throwDefaultError({
1859
+ return throwDefaultError({
1896
1860
  output,
1897
1861
  parsedBody: parsedBody.Error,
1898
- exceptionCtor: __BaseException,
1899
1862
  errorCode,
1900
1863
  });
1901
1864
  }
@@ -1911,7 +1874,7 @@ export const de_ImportStacksToStackSetCommand = async (output, context) => {
1911
1874
  $metadata: deserializeMetadata(output),
1912
1875
  ...contents,
1913
1876
  };
1914
- return Promise.resolve(response);
1877
+ return response;
1915
1878
  };
1916
1879
  const de_ImportStacksToStackSetCommandError = async (output, context) => {
1917
1880
  const parsedOutput = {
@@ -1943,10 +1906,9 @@ const de_ImportStacksToStackSetCommandError = async (output, context) => {
1943
1906
  throw await de_StaleRequestExceptionRes(parsedOutput, context);
1944
1907
  default:
1945
1908
  const parsedBody = parsedOutput.body;
1946
- throwDefaultError({
1909
+ return throwDefaultError({
1947
1910
  output,
1948
1911
  parsedBody: parsedBody.Error,
1949
- exceptionCtor: __BaseException,
1950
1912
  errorCode,
1951
1913
  });
1952
1914
  }
@@ -1962,7 +1924,7 @@ export const de_ListChangeSetsCommand = async (output, context) => {
1962
1924
  $metadata: deserializeMetadata(output),
1963
1925
  ...contents,
1964
1926
  };
1965
- return Promise.resolve(response);
1927
+ return response;
1966
1928
  };
1967
1929
  const de_ListChangeSetsCommandError = async (output, context) => {
1968
1930
  const parsedOutput = {
@@ -1971,10 +1933,9 @@ const de_ListChangeSetsCommandError = async (output, context) => {
1971
1933
  };
1972
1934
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1973
1935
  const parsedBody = parsedOutput.body;
1974
- throwDefaultError({
1936
+ return throwDefaultError({
1975
1937
  output,
1976
1938
  parsedBody: parsedBody.Error,
1977
- exceptionCtor: __BaseException,
1978
1939
  errorCode,
1979
1940
  });
1980
1941
  };
@@ -1989,7 +1950,7 @@ export const de_ListExportsCommand = async (output, context) => {
1989
1950
  $metadata: deserializeMetadata(output),
1990
1951
  ...contents,
1991
1952
  };
1992
- return Promise.resolve(response);
1953
+ return response;
1993
1954
  };
1994
1955
  const de_ListExportsCommandError = async (output, context) => {
1995
1956
  const parsedOutput = {
@@ -1998,10 +1959,9 @@ const de_ListExportsCommandError = async (output, context) => {
1998
1959
  };
1999
1960
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
2000
1961
  const parsedBody = parsedOutput.body;
2001
- throwDefaultError({
1962
+ return throwDefaultError({
2002
1963
  output,
2003
1964
  parsedBody: parsedBody.Error,
2004
- exceptionCtor: __BaseException,
2005
1965
  errorCode,
2006
1966
  });
2007
1967
  };
@@ -2016,7 +1976,7 @@ export const de_ListImportsCommand = async (output, context) => {
2016
1976
  $metadata: deserializeMetadata(output),
2017
1977
  ...contents,
2018
1978
  };
2019
- return Promise.resolve(response);
1979
+ return response;
2020
1980
  };
2021
1981
  const de_ListImportsCommandError = async (output, context) => {
2022
1982
  const parsedOutput = {
@@ -2025,10 +1985,9 @@ const de_ListImportsCommandError = async (output, context) => {
2025
1985
  };
2026
1986
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
2027
1987
  const parsedBody = parsedOutput.body;
2028
- throwDefaultError({
1988
+ return throwDefaultError({
2029
1989
  output,
2030
1990
  parsedBody: parsedBody.Error,
2031
- exceptionCtor: __BaseException,
2032
1991
  errorCode,
2033
1992
  });
2034
1993
  };
@@ -2043,7 +2002,7 @@ export const de_ListStackInstancesCommand = async (output, context) => {
2043
2002
  $metadata: deserializeMetadata(output),
2044
2003
  ...contents,
2045
2004
  };
2046
- return Promise.resolve(response);
2005
+ return response;
2047
2006
  };
2048
2007
  const de_ListStackInstancesCommandError = async (output, context) => {
2049
2008
  const parsedOutput = {
@@ -2057,10 +2016,9 @@ const de_ListStackInstancesCommandError = async (output, context) => {
2057
2016
  throw await de_StackSetNotFoundExceptionRes(parsedOutput, context);
2058
2017
  default:
2059
2018
  const parsedBody = parsedOutput.body;
2060
- throwDefaultError({
2019
+ return throwDefaultError({
2061
2020
  output,
2062
2021
  parsedBody: parsedBody.Error,
2063
- exceptionCtor: __BaseException,
2064
2022
  errorCode,
2065
2023
  });
2066
2024
  }
@@ -2076,7 +2034,7 @@ export const de_ListStackResourcesCommand = async (output, context) => {
2076
2034
  $metadata: deserializeMetadata(output),
2077
2035
  ...contents,
2078
2036
  };
2079
- return Promise.resolve(response);
2037
+ return response;
2080
2038
  };
2081
2039
  const de_ListStackResourcesCommandError = async (output, context) => {
2082
2040
  const parsedOutput = {
@@ -2085,10 +2043,9 @@ const de_ListStackResourcesCommandError = async (output, context) => {
2085
2043
  };
2086
2044
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
2087
2045
  const parsedBody = parsedOutput.body;
2088
- throwDefaultError({
2046
+ return throwDefaultError({
2089
2047
  output,
2090
2048
  parsedBody: parsedBody.Error,
2091
- exceptionCtor: __BaseException,
2092
2049
  errorCode,
2093
2050
  });
2094
2051
  };
@@ -2103,7 +2060,7 @@ export const de_ListStacksCommand = async (output, context) => {
2103
2060
  $metadata: deserializeMetadata(output),
2104
2061
  ...contents,
2105
2062
  };
2106
- return Promise.resolve(response);
2063
+ return response;
2107
2064
  };
2108
2065
  const de_ListStacksCommandError = async (output, context) => {
2109
2066
  const parsedOutput = {
@@ -2112,10 +2069,9 @@ const de_ListStacksCommandError = async (output, context) => {
2112
2069
  };
2113
2070
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
2114
2071
  const parsedBody = parsedOutput.body;
2115
- throwDefaultError({
2072
+ return throwDefaultError({
2116
2073
  output,
2117
2074
  parsedBody: parsedBody.Error,
2118
- exceptionCtor: __BaseException,
2119
2075
  errorCode,
2120
2076
  });
2121
2077
  };
@@ -2130,7 +2086,7 @@ export const de_ListStackSetOperationResultsCommand = async (output, context) =>
2130
2086
  $metadata: deserializeMetadata(output),
2131
2087
  ...contents,
2132
2088
  };
2133
- return Promise.resolve(response);
2089
+ return response;
2134
2090
  };
2135
2091
  const de_ListStackSetOperationResultsCommandError = async (output, context) => {
2136
2092
  const parsedOutput = {
@@ -2147,10 +2103,9 @@ const de_ListStackSetOperationResultsCommandError = async (output, context) => {
2147
2103
  throw await de_StackSetNotFoundExceptionRes(parsedOutput, context);
2148
2104
  default:
2149
2105
  const parsedBody = parsedOutput.body;
2150
- throwDefaultError({
2106
+ return throwDefaultError({
2151
2107
  output,
2152
2108
  parsedBody: parsedBody.Error,
2153
- exceptionCtor: __BaseException,
2154
2109
  errorCode,
2155
2110
  });
2156
2111
  }
@@ -2166,7 +2121,7 @@ export const de_ListStackSetOperationsCommand = async (output, context) => {
2166
2121
  $metadata: deserializeMetadata(output),
2167
2122
  ...contents,
2168
2123
  };
2169
- return Promise.resolve(response);
2124
+ return response;
2170
2125
  };
2171
2126
  const de_ListStackSetOperationsCommandError = async (output, context) => {
2172
2127
  const parsedOutput = {
@@ -2180,10 +2135,9 @@ const de_ListStackSetOperationsCommandError = async (output, context) => {
2180
2135
  throw await de_StackSetNotFoundExceptionRes(parsedOutput, context);
2181
2136
  default:
2182
2137
  const parsedBody = parsedOutput.body;
2183
- throwDefaultError({
2138
+ return throwDefaultError({
2184
2139
  output,
2185
2140
  parsedBody: parsedBody.Error,
2186
- exceptionCtor: __BaseException,
2187
2141
  errorCode,
2188
2142
  });
2189
2143
  }
@@ -2199,7 +2153,7 @@ export const de_ListStackSetsCommand = async (output, context) => {
2199
2153
  $metadata: deserializeMetadata(output),
2200
2154
  ...contents,
2201
2155
  };
2202
- return Promise.resolve(response);
2156
+ return response;
2203
2157
  };
2204
2158
  const de_ListStackSetsCommandError = async (output, context) => {
2205
2159
  const parsedOutput = {
@@ -2208,10 +2162,9 @@ const de_ListStackSetsCommandError = async (output, context) => {
2208
2162
  };
2209
2163
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
2210
2164
  const parsedBody = parsedOutput.body;
2211
- throwDefaultError({
2165
+ return throwDefaultError({
2212
2166
  output,
2213
2167
  parsedBody: parsedBody.Error,
2214
- exceptionCtor: __BaseException,
2215
2168
  errorCode,
2216
2169
  });
2217
2170
  };
@@ -2226,7 +2179,7 @@ export const de_ListTypeRegistrationsCommand = async (output, context) => {
2226
2179
  $metadata: deserializeMetadata(output),
2227
2180
  ...contents,
2228
2181
  };
2229
- return Promise.resolve(response);
2182
+ return response;
2230
2183
  };
2231
2184
  const de_ListTypeRegistrationsCommandError = async (output, context) => {
2232
2185
  const parsedOutput = {
@@ -2240,10 +2193,9 @@ const de_ListTypeRegistrationsCommandError = async (output, context) => {
2240
2193
  throw await de_CFNRegistryExceptionRes(parsedOutput, context);
2241
2194
  default:
2242
2195
  const parsedBody = parsedOutput.body;
2243
- throwDefaultError({
2196
+ return throwDefaultError({
2244
2197
  output,
2245
2198
  parsedBody: parsedBody.Error,
2246
- exceptionCtor: __BaseException,
2247
2199
  errorCode,
2248
2200
  });
2249
2201
  }
@@ -2259,7 +2211,7 @@ export const de_ListTypesCommand = async (output, context) => {
2259
2211
  $metadata: deserializeMetadata(output),
2260
2212
  ...contents,
2261
2213
  };
2262
- return Promise.resolve(response);
2214
+ return response;
2263
2215
  };
2264
2216
  const de_ListTypesCommandError = async (output, context) => {
2265
2217
  const parsedOutput = {
@@ -2273,10 +2225,9 @@ const de_ListTypesCommandError = async (output, context) => {
2273
2225
  throw await de_CFNRegistryExceptionRes(parsedOutput, context);
2274
2226
  default:
2275
2227
  const parsedBody = parsedOutput.body;
2276
- throwDefaultError({
2228
+ return throwDefaultError({
2277
2229
  output,
2278
2230
  parsedBody: parsedBody.Error,
2279
- exceptionCtor: __BaseException,
2280
2231
  errorCode,
2281
2232
  });
2282
2233
  }
@@ -2292,7 +2243,7 @@ export const de_ListTypeVersionsCommand = async (output, context) => {
2292
2243
  $metadata: deserializeMetadata(output),
2293
2244
  ...contents,
2294
2245
  };
2295
- return Promise.resolve(response);
2246
+ return response;
2296
2247
  };
2297
2248
  const de_ListTypeVersionsCommandError = async (output, context) => {
2298
2249
  const parsedOutput = {
@@ -2306,10 +2257,9 @@ const de_ListTypeVersionsCommandError = async (output, context) => {
2306
2257
  throw await de_CFNRegistryExceptionRes(parsedOutput, context);
2307
2258
  default:
2308
2259
  const parsedBody = parsedOutput.body;
2309
- throwDefaultError({
2260
+ return throwDefaultError({
2310
2261
  output,
2311
2262
  parsedBody: parsedBody.Error,
2312
- exceptionCtor: __BaseException,
2313
2263
  errorCode,
2314
2264
  });
2315
2265
  }
@@ -2325,7 +2275,7 @@ export const de_PublishTypeCommand = async (output, context) => {
2325
2275
  $metadata: deserializeMetadata(output),
2326
2276
  ...contents,
2327
2277
  };
2328
- return Promise.resolve(response);
2278
+ return response;
2329
2279
  };
2330
2280
  const de_PublishTypeCommandError = async (output, context) => {
2331
2281
  const parsedOutput = {
@@ -2342,10 +2292,9 @@ const de_PublishTypeCommandError = async (output, context) => {
2342
2292
  throw await de_TypeNotFoundExceptionRes(parsedOutput, context);
2343
2293
  default:
2344
2294
  const parsedBody = parsedOutput.body;
2345
- throwDefaultError({
2295
+ return throwDefaultError({
2346
2296
  output,
2347
2297
  parsedBody: parsedBody.Error,
2348
- exceptionCtor: __BaseException,
2349
2298
  errorCode,
2350
2299
  });
2351
2300
  }
@@ -2361,7 +2310,7 @@ export const de_RecordHandlerProgressCommand = async (output, context) => {
2361
2310
  $metadata: deserializeMetadata(output),
2362
2311
  ...contents,
2363
2312
  };
2364
- return Promise.resolve(response);
2313
+ return response;
2365
2314
  };
2366
2315
  const de_RecordHandlerProgressCommandError = async (output, context) => {
2367
2316
  const parsedOutput = {
@@ -2378,10 +2327,9 @@ const de_RecordHandlerProgressCommandError = async (output, context) => {
2378
2327
  throw await de_InvalidStateTransitionExceptionRes(parsedOutput, context);
2379
2328
  default:
2380
2329
  const parsedBody = parsedOutput.body;
2381
- throwDefaultError({
2330
+ return throwDefaultError({
2382
2331
  output,
2383
2332
  parsedBody: parsedBody.Error,
2384
- exceptionCtor: __BaseException,
2385
2333
  errorCode,
2386
2334
  });
2387
2335
  }
@@ -2397,7 +2345,7 @@ export const de_RegisterPublisherCommand = async (output, context) => {
2397
2345
  $metadata: deserializeMetadata(output),
2398
2346
  ...contents,
2399
2347
  };
2400
- return Promise.resolve(response);
2348
+ return response;
2401
2349
  };
2402
2350
  const de_RegisterPublisherCommandError = async (output, context) => {
2403
2351
  const parsedOutput = {
@@ -2411,10 +2359,9 @@ const de_RegisterPublisherCommandError = async (output, context) => {
2411
2359
  throw await de_CFNRegistryExceptionRes(parsedOutput, context);
2412
2360
  default:
2413
2361
  const parsedBody = parsedOutput.body;
2414
- throwDefaultError({
2362
+ return throwDefaultError({
2415
2363
  output,
2416
2364
  parsedBody: parsedBody.Error,
2417
- exceptionCtor: __BaseException,
2418
2365
  errorCode,
2419
2366
  });
2420
2367
  }
@@ -2430,7 +2377,7 @@ export const de_RegisterTypeCommand = async (output, context) => {
2430
2377
  $metadata: deserializeMetadata(output),
2431
2378
  ...contents,
2432
2379
  };
2433
- return Promise.resolve(response);
2380
+ return response;
2434
2381
  };
2435
2382
  const de_RegisterTypeCommandError = async (output, context) => {
2436
2383
  const parsedOutput = {
@@ -2444,10 +2391,9 @@ const de_RegisterTypeCommandError = async (output, context) => {
2444
2391
  throw await de_CFNRegistryExceptionRes(parsedOutput, context);
2445
2392
  default:
2446
2393
  const parsedBody = parsedOutput.body;
2447
- throwDefaultError({
2394
+ return throwDefaultError({
2448
2395
  output,
2449
2396
  parsedBody: parsedBody.Error,
2450
- exceptionCtor: __BaseException,
2451
2397
  errorCode,
2452
2398
  });
2453
2399
  }
@@ -2463,7 +2409,7 @@ export const de_RollbackStackCommand = async (output, context) => {
2463
2409
  $metadata: deserializeMetadata(output),
2464
2410
  ...contents,
2465
2411
  };
2466
- return Promise.resolve(response);
2412
+ return response;
2467
2413
  };
2468
2414
  const de_RollbackStackCommandError = async (output, context) => {
2469
2415
  const parsedOutput = {
@@ -2477,10 +2423,9 @@ const de_RollbackStackCommandError = async (output, context) => {
2477
2423
  throw await de_TokenAlreadyExistsExceptionRes(parsedOutput, context);
2478
2424
  default:
2479
2425
  const parsedBody = parsedOutput.body;
2480
- throwDefaultError({
2426
+ return throwDefaultError({
2481
2427
  output,
2482
2428
  parsedBody: parsedBody.Error,
2483
- exceptionCtor: __BaseException,
2484
2429
  errorCode,
2485
2430
  });
2486
2431
  }
@@ -2493,7 +2438,7 @@ export const de_SetStackPolicyCommand = async (output, context) => {
2493
2438
  const response = {
2494
2439
  $metadata: deserializeMetadata(output),
2495
2440
  };
2496
- return Promise.resolve(response);
2441
+ return response;
2497
2442
  };
2498
2443
  const de_SetStackPolicyCommandError = async (output, context) => {
2499
2444
  const parsedOutput = {
@@ -2502,10 +2447,9 @@ const de_SetStackPolicyCommandError = async (output, context) => {
2502
2447
  };
2503
2448
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
2504
2449
  const parsedBody = parsedOutput.body;
2505
- throwDefaultError({
2450
+ return throwDefaultError({
2506
2451
  output,
2507
2452
  parsedBody: parsedBody.Error,
2508
- exceptionCtor: __BaseException,
2509
2453
  errorCode,
2510
2454
  });
2511
2455
  };
@@ -2520,7 +2464,7 @@ export const de_SetTypeConfigurationCommand = async (output, context) => {
2520
2464
  $metadata: deserializeMetadata(output),
2521
2465
  ...contents,
2522
2466
  };
2523
- return Promise.resolve(response);
2467
+ return response;
2524
2468
  };
2525
2469
  const de_SetTypeConfigurationCommandError = async (output, context) => {
2526
2470
  const parsedOutput = {
@@ -2537,10 +2481,9 @@ const de_SetTypeConfigurationCommandError = async (output, context) => {
2537
2481
  throw await de_TypeNotFoundExceptionRes(parsedOutput, context);
2538
2482
  default:
2539
2483
  const parsedBody = parsedOutput.body;
2540
- throwDefaultError({
2484
+ return throwDefaultError({
2541
2485
  output,
2542
2486
  parsedBody: parsedBody.Error,
2543
- exceptionCtor: __BaseException,
2544
2487
  errorCode,
2545
2488
  });
2546
2489
  }
@@ -2556,7 +2499,7 @@ export const de_SetTypeDefaultVersionCommand = async (output, context) => {
2556
2499
  $metadata: deserializeMetadata(output),
2557
2500
  ...contents,
2558
2501
  };
2559
- return Promise.resolve(response);
2502
+ return response;
2560
2503
  };
2561
2504
  const de_SetTypeDefaultVersionCommandError = async (output, context) => {
2562
2505
  const parsedOutput = {
@@ -2573,10 +2516,9 @@ const de_SetTypeDefaultVersionCommandError = async (output, context) => {
2573
2516
  throw await de_TypeNotFoundExceptionRes(parsedOutput, context);
2574
2517
  default:
2575
2518
  const parsedBody = parsedOutput.body;
2576
- throwDefaultError({
2519
+ return throwDefaultError({
2577
2520
  output,
2578
2521
  parsedBody: parsedBody.Error,
2579
- exceptionCtor: __BaseException,
2580
2522
  errorCode,
2581
2523
  });
2582
2524
  }
@@ -2589,7 +2531,7 @@ export const de_SignalResourceCommand = async (output, context) => {
2589
2531
  const response = {
2590
2532
  $metadata: deserializeMetadata(output),
2591
2533
  };
2592
- return Promise.resolve(response);
2534
+ return response;
2593
2535
  };
2594
2536
  const de_SignalResourceCommandError = async (output, context) => {
2595
2537
  const parsedOutput = {
@@ -2598,10 +2540,9 @@ const de_SignalResourceCommandError = async (output, context) => {
2598
2540
  };
2599
2541
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
2600
2542
  const parsedBody = parsedOutput.body;
2601
- throwDefaultError({
2543
+ return throwDefaultError({
2602
2544
  output,
2603
2545
  parsedBody: parsedBody.Error,
2604
- exceptionCtor: __BaseException,
2605
2546
  errorCode,
2606
2547
  });
2607
2548
  };
@@ -2616,7 +2557,7 @@ export const de_StopStackSetOperationCommand = async (output, context) => {
2616
2557
  $metadata: deserializeMetadata(output),
2617
2558
  ...contents,
2618
2559
  };
2619
- return Promise.resolve(response);
2560
+ return response;
2620
2561
  };
2621
2562
  const de_StopStackSetOperationCommandError = async (output, context) => {
2622
2563
  const parsedOutput = {
@@ -2636,10 +2577,9 @@ const de_StopStackSetOperationCommandError = async (output, context) => {
2636
2577
  throw await de_StackSetNotFoundExceptionRes(parsedOutput, context);
2637
2578
  default:
2638
2579
  const parsedBody = parsedOutput.body;
2639
- throwDefaultError({
2580
+ return throwDefaultError({
2640
2581
  output,
2641
2582
  parsedBody: parsedBody.Error,
2642
- exceptionCtor: __BaseException,
2643
2583
  errorCode,
2644
2584
  });
2645
2585
  }
@@ -2655,7 +2595,7 @@ export const de_TestTypeCommand = async (output, context) => {
2655
2595
  $metadata: deserializeMetadata(output),
2656
2596
  ...contents,
2657
2597
  };
2658
- return Promise.resolve(response);
2598
+ return response;
2659
2599
  };
2660
2600
  const de_TestTypeCommandError = async (output, context) => {
2661
2601
  const parsedOutput = {
@@ -2672,10 +2612,9 @@ const de_TestTypeCommandError = async (output, context) => {
2672
2612
  throw await de_TypeNotFoundExceptionRes(parsedOutput, context);
2673
2613
  default:
2674
2614
  const parsedBody = parsedOutput.body;
2675
- throwDefaultError({
2615
+ return throwDefaultError({
2676
2616
  output,
2677
2617
  parsedBody: parsedBody.Error,
2678
- exceptionCtor: __BaseException,
2679
2618
  errorCode,
2680
2619
  });
2681
2620
  }
@@ -2691,7 +2630,7 @@ export const de_UpdateStackCommand = async (output, context) => {
2691
2630
  $metadata: deserializeMetadata(output),
2692
2631
  ...contents,
2693
2632
  };
2694
- return Promise.resolve(response);
2633
+ return response;
2695
2634
  };
2696
2635
  const de_UpdateStackCommandError = async (output, context) => {
2697
2636
  const parsedOutput = {
@@ -2708,10 +2647,9 @@ const de_UpdateStackCommandError = async (output, context) => {
2708
2647
  throw await de_TokenAlreadyExistsExceptionRes(parsedOutput, context);
2709
2648
  default:
2710
2649
  const parsedBody = parsedOutput.body;
2711
- throwDefaultError({
2650
+ return throwDefaultError({
2712
2651
  output,
2713
2652
  parsedBody: parsedBody.Error,
2714
- exceptionCtor: __BaseException,
2715
2653
  errorCode,
2716
2654
  });
2717
2655
  }
@@ -2727,7 +2665,7 @@ export const de_UpdateStackInstancesCommand = async (output, context) => {
2727
2665
  $metadata: deserializeMetadata(output),
2728
2666
  ...contents,
2729
2667
  };
2730
- return Promise.resolve(response);
2668
+ return response;
2731
2669
  };
2732
2670
  const de_UpdateStackInstancesCommandError = async (output, context) => {
2733
2671
  const parsedOutput = {
@@ -2756,10 +2694,9 @@ const de_UpdateStackInstancesCommandError = async (output, context) => {
2756
2694
  throw await de_StaleRequestExceptionRes(parsedOutput, context);
2757
2695
  default:
2758
2696
  const parsedBody = parsedOutput.body;
2759
- throwDefaultError({
2697
+ return throwDefaultError({
2760
2698
  output,
2761
2699
  parsedBody: parsedBody.Error,
2762
- exceptionCtor: __BaseException,
2763
2700
  errorCode,
2764
2701
  });
2765
2702
  }
@@ -2775,7 +2712,7 @@ export const de_UpdateStackSetCommand = async (output, context) => {
2775
2712
  $metadata: deserializeMetadata(output),
2776
2713
  ...contents,
2777
2714
  };
2778
- return Promise.resolve(response);
2715
+ return response;
2779
2716
  };
2780
2717
  const de_UpdateStackSetCommandError = async (output, context) => {
2781
2718
  const parsedOutput = {
@@ -2804,10 +2741,9 @@ const de_UpdateStackSetCommandError = async (output, context) => {
2804
2741
  throw await de_StaleRequestExceptionRes(parsedOutput, context);
2805
2742
  default:
2806
2743
  const parsedBody = parsedOutput.body;
2807
- throwDefaultError({
2744
+ return throwDefaultError({
2808
2745
  output,
2809
2746
  parsedBody: parsedBody.Error,
2810
- exceptionCtor: __BaseException,
2811
2747
  errorCode,
2812
2748
  });
2813
2749
  }
@@ -2823,7 +2759,7 @@ export const de_UpdateTerminationProtectionCommand = async (output, context) =>
2823
2759
  $metadata: deserializeMetadata(output),
2824
2760
  ...contents,
2825
2761
  };
2826
- return Promise.resolve(response);
2762
+ return response;
2827
2763
  };
2828
2764
  const de_UpdateTerminationProtectionCommandError = async (output, context) => {
2829
2765
  const parsedOutput = {
@@ -2832,10 +2768,9 @@ const de_UpdateTerminationProtectionCommandError = async (output, context) => {
2832
2768
  };
2833
2769
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
2834
2770
  const parsedBody = parsedOutput.body;
2835
- throwDefaultError({
2771
+ return throwDefaultError({
2836
2772
  output,
2837
2773
  parsedBody: parsedBody.Error,
2838
- exceptionCtor: __BaseException,
2839
2774
  errorCode,
2840
2775
  });
2841
2776
  };
@@ -2850,7 +2785,7 @@ export const de_ValidateTemplateCommand = async (output, context) => {
2850
2785
  $metadata: deserializeMetadata(output),
2851
2786
  ...contents,
2852
2787
  };
2853
- return Promise.resolve(response);
2788
+ return response;
2854
2789
  };
2855
2790
  const de_ValidateTemplateCommandError = async (output, context) => {
2856
2791
  const parsedOutput = {
@@ -2859,10 +2794,9 @@ const de_ValidateTemplateCommandError = async (output, context) => {
2859
2794
  };
2860
2795
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
2861
2796
  const parsedBody = parsedOutput.body;
2862
- throwDefaultError({
2797
+ return throwDefaultError({
2863
2798
  output,
2864
2799
  parsedBody: parsedBody.Error,
2865
- exceptionCtor: __BaseException,
2866
2800
  errorCode,
2867
2801
  });
2868
2802
  };
@@ -7691,6 +7625,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
7691
7625
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
7692
7626
  };
7693
7627
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
7628
+ const throwDefaultError = withBaseException(__BaseException);
7694
7629
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
7695
7630
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
7696
7631
  const contents = {