@aws-sdk/client-auto-scaling 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.
@@ -717,7 +717,7 @@ const de_AttachInstancesCommand = async (output, context) => {
717
717
  const response = {
718
718
  $metadata: deserializeMetadata(output),
719
719
  };
720
- return Promise.resolve(response);
720
+ return response;
721
721
  };
722
722
  exports.de_AttachInstancesCommand = de_AttachInstancesCommand;
723
723
  const de_AttachInstancesCommandError = async (output, context) => {
@@ -735,10 +735,9 @@ const de_AttachInstancesCommandError = async (output, context) => {
735
735
  throw await de_ServiceLinkedRoleFailureRes(parsedOutput, context);
736
736
  default:
737
737
  const parsedBody = parsedOutput.body;
738
- (0, smithy_client_1.throwDefaultError)({
738
+ return throwDefaultError({
739
739
  output,
740
740
  parsedBody: parsedBody.Error,
741
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
742
741
  errorCode,
743
742
  });
744
743
  }
@@ -754,7 +753,7 @@ const de_AttachLoadBalancersCommand = async (output, context) => {
754
753
  $metadata: deserializeMetadata(output),
755
754
  ...contents,
756
755
  };
757
- return Promise.resolve(response);
756
+ return response;
758
757
  };
759
758
  exports.de_AttachLoadBalancersCommand = de_AttachLoadBalancersCommand;
760
759
  const de_AttachLoadBalancersCommandError = async (output, context) => {
@@ -772,10 +771,9 @@ const de_AttachLoadBalancersCommandError = async (output, context) => {
772
771
  throw await de_ServiceLinkedRoleFailureRes(parsedOutput, context);
773
772
  default:
774
773
  const parsedBody = parsedOutput.body;
775
- (0, smithy_client_1.throwDefaultError)({
774
+ return throwDefaultError({
776
775
  output,
777
776
  parsedBody: parsedBody.Error,
778
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
779
777
  errorCode,
780
778
  });
781
779
  }
@@ -791,7 +789,7 @@ const de_AttachLoadBalancerTargetGroupsCommand = async (output, context) => {
791
789
  $metadata: deserializeMetadata(output),
792
790
  ...contents,
793
791
  };
794
- return Promise.resolve(response);
792
+ return response;
795
793
  };
796
794
  exports.de_AttachLoadBalancerTargetGroupsCommand = de_AttachLoadBalancerTargetGroupsCommand;
797
795
  const de_AttachLoadBalancerTargetGroupsCommandError = async (output, context) => {
@@ -809,10 +807,9 @@ const de_AttachLoadBalancerTargetGroupsCommandError = async (output, context) =>
809
807
  throw await de_ServiceLinkedRoleFailureRes(parsedOutput, context);
810
808
  default:
811
809
  const parsedBody = parsedOutput.body;
812
- (0, smithy_client_1.throwDefaultError)({
810
+ return throwDefaultError({
813
811
  output,
814
812
  parsedBody: parsedBody.Error,
815
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
816
813
  errorCode,
817
814
  });
818
815
  }
@@ -828,7 +825,7 @@ const de_AttachTrafficSourcesCommand = async (output, context) => {
828
825
  $metadata: deserializeMetadata(output),
829
826
  ...contents,
830
827
  };
831
- return Promise.resolve(response);
828
+ return response;
832
829
  };
833
830
  exports.de_AttachTrafficSourcesCommand = de_AttachTrafficSourcesCommand;
834
831
  const de_AttachTrafficSourcesCommandError = async (output, context) => {
@@ -846,10 +843,9 @@ const de_AttachTrafficSourcesCommandError = async (output, context) => {
846
843
  throw await de_ServiceLinkedRoleFailureRes(parsedOutput, context);
847
844
  default:
848
845
  const parsedBody = parsedOutput.body;
849
- (0, smithy_client_1.throwDefaultError)({
846
+ return throwDefaultError({
850
847
  output,
851
848
  parsedBody: parsedBody.Error,
852
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
853
849
  errorCode,
854
850
  });
855
851
  }
@@ -865,7 +861,7 @@ const de_BatchDeleteScheduledActionCommand = async (output, context) => {
865
861
  $metadata: deserializeMetadata(output),
866
862
  ...contents,
867
863
  };
868
- return Promise.resolve(response);
864
+ return response;
869
865
  };
870
866
  exports.de_BatchDeleteScheduledActionCommand = de_BatchDeleteScheduledActionCommand;
871
867
  const de_BatchDeleteScheduledActionCommandError = async (output, context) => {
@@ -880,10 +876,9 @@ const de_BatchDeleteScheduledActionCommandError = async (output, context) => {
880
876
  throw await de_ResourceContentionFaultRes(parsedOutput, context);
881
877
  default:
882
878
  const parsedBody = parsedOutput.body;
883
- (0, smithy_client_1.throwDefaultError)({
879
+ return throwDefaultError({
884
880
  output,
885
881
  parsedBody: parsedBody.Error,
886
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
887
882
  errorCode,
888
883
  });
889
884
  }
@@ -899,7 +894,7 @@ const de_BatchPutScheduledUpdateGroupActionCommand = async (output, context) =>
899
894
  $metadata: deserializeMetadata(output),
900
895
  ...contents,
901
896
  };
902
- return Promise.resolve(response);
897
+ return response;
903
898
  };
904
899
  exports.de_BatchPutScheduledUpdateGroupActionCommand = de_BatchPutScheduledUpdateGroupActionCommand;
905
900
  const de_BatchPutScheduledUpdateGroupActionCommandError = async (output, context) => {
@@ -920,10 +915,9 @@ const de_BatchPutScheduledUpdateGroupActionCommandError = async (output, context
920
915
  throw await de_ResourceContentionFaultRes(parsedOutput, context);
921
916
  default:
922
917
  const parsedBody = parsedOutput.body;
923
- (0, smithy_client_1.throwDefaultError)({
918
+ return throwDefaultError({
924
919
  output,
925
920
  parsedBody: parsedBody.Error,
926
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
927
921
  errorCode,
928
922
  });
929
923
  }
@@ -939,7 +933,7 @@ const de_CancelInstanceRefreshCommand = async (output, context) => {
939
933
  $metadata: deserializeMetadata(output),
940
934
  ...contents,
941
935
  };
942
- return Promise.resolve(response);
936
+ return response;
943
937
  };
944
938
  exports.de_CancelInstanceRefreshCommand = de_CancelInstanceRefreshCommand;
945
939
  const de_CancelInstanceRefreshCommandError = async (output, context) => {
@@ -960,10 +954,9 @@ const de_CancelInstanceRefreshCommandError = async (output, context) => {
960
954
  throw await de_ResourceContentionFaultRes(parsedOutput, context);
961
955
  default:
962
956
  const parsedBody = parsedOutput.body;
963
- (0, smithy_client_1.throwDefaultError)({
957
+ return throwDefaultError({
964
958
  output,
965
959
  parsedBody: parsedBody.Error,
966
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
967
960
  errorCode,
968
961
  });
969
962
  }
@@ -979,7 +972,7 @@ const de_CompleteLifecycleActionCommand = async (output, context) => {
979
972
  $metadata: deserializeMetadata(output),
980
973
  ...contents,
981
974
  };
982
- return Promise.resolve(response);
975
+ return response;
983
976
  };
984
977
  exports.de_CompleteLifecycleActionCommand = de_CompleteLifecycleActionCommand;
985
978
  const de_CompleteLifecycleActionCommandError = async (output, context) => {
@@ -994,10 +987,9 @@ const de_CompleteLifecycleActionCommandError = async (output, context) => {
994
987
  throw await de_ResourceContentionFaultRes(parsedOutput, context);
995
988
  default:
996
989
  const parsedBody = parsedOutput.body;
997
- (0, smithy_client_1.throwDefaultError)({
990
+ return throwDefaultError({
998
991
  output,
999
992
  parsedBody: parsedBody.Error,
1000
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
1001
993
  errorCode,
1002
994
  });
1003
995
  }
@@ -1010,7 +1002,7 @@ const de_CreateAutoScalingGroupCommand = async (output, context) => {
1010
1002
  const response = {
1011
1003
  $metadata: deserializeMetadata(output),
1012
1004
  };
1013
- return Promise.resolve(response);
1005
+ return response;
1014
1006
  };
1015
1007
  exports.de_CreateAutoScalingGroupCommand = de_CreateAutoScalingGroupCommand;
1016
1008
  const de_CreateAutoScalingGroupCommandError = async (output, context) => {
@@ -1034,10 +1026,9 @@ const de_CreateAutoScalingGroupCommandError = async (output, context) => {
1034
1026
  throw await de_ServiceLinkedRoleFailureRes(parsedOutput, context);
1035
1027
  default:
1036
1028
  const parsedBody = parsedOutput.body;
1037
- (0, smithy_client_1.throwDefaultError)({
1029
+ return throwDefaultError({
1038
1030
  output,
1039
1031
  parsedBody: parsedBody.Error,
1040
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
1041
1032
  errorCode,
1042
1033
  });
1043
1034
  }
@@ -1050,7 +1041,7 @@ const de_CreateLaunchConfigurationCommand = async (output, context) => {
1050
1041
  const response = {
1051
1042
  $metadata: deserializeMetadata(output),
1052
1043
  };
1053
- return Promise.resolve(response);
1044
+ return response;
1054
1045
  };
1055
1046
  exports.de_CreateLaunchConfigurationCommand = de_CreateLaunchConfigurationCommand;
1056
1047
  const de_CreateLaunchConfigurationCommandError = async (output, context) => {
@@ -1071,10 +1062,9 @@ const de_CreateLaunchConfigurationCommandError = async (output, context) => {
1071
1062
  throw await de_ResourceContentionFaultRes(parsedOutput, context);
1072
1063
  default:
1073
1064
  const parsedBody = parsedOutput.body;
1074
- (0, smithy_client_1.throwDefaultError)({
1065
+ return throwDefaultError({
1075
1066
  output,
1076
1067
  parsedBody: parsedBody.Error,
1077
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
1078
1068
  errorCode,
1079
1069
  });
1080
1070
  }
@@ -1087,7 +1077,7 @@ const de_CreateOrUpdateTagsCommand = async (output, context) => {
1087
1077
  const response = {
1088
1078
  $metadata: deserializeMetadata(output),
1089
1079
  };
1090
- return Promise.resolve(response);
1080
+ return response;
1091
1081
  };
1092
1082
  exports.de_CreateOrUpdateTagsCommand = de_CreateOrUpdateTagsCommand;
1093
1083
  const de_CreateOrUpdateTagsCommandError = async (output, context) => {
@@ -1111,10 +1101,9 @@ const de_CreateOrUpdateTagsCommandError = async (output, context) => {
1111
1101
  throw await de_ResourceInUseFaultRes(parsedOutput, context);
1112
1102
  default:
1113
1103
  const parsedBody = parsedOutput.body;
1114
- (0, smithy_client_1.throwDefaultError)({
1104
+ return throwDefaultError({
1115
1105
  output,
1116
1106
  parsedBody: parsedBody.Error,
1117
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
1118
1107
  errorCode,
1119
1108
  });
1120
1109
  }
@@ -1127,7 +1116,7 @@ const de_DeleteAutoScalingGroupCommand = async (output, context) => {
1127
1116
  const response = {
1128
1117
  $metadata: deserializeMetadata(output),
1129
1118
  };
1130
- return Promise.resolve(response);
1119
+ return response;
1131
1120
  };
1132
1121
  exports.de_DeleteAutoScalingGroupCommand = de_DeleteAutoScalingGroupCommand;
1133
1122
  const de_DeleteAutoScalingGroupCommandError = async (output, context) => {
@@ -1148,10 +1137,9 @@ const de_DeleteAutoScalingGroupCommandError = async (output, context) => {
1148
1137
  throw await de_ScalingActivityInProgressFaultRes(parsedOutput, context);
1149
1138
  default:
1150
1139
  const parsedBody = parsedOutput.body;
1151
- (0, smithy_client_1.throwDefaultError)({
1140
+ return throwDefaultError({
1152
1141
  output,
1153
1142
  parsedBody: parsedBody.Error,
1154
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
1155
1143
  errorCode,
1156
1144
  });
1157
1145
  }
@@ -1164,7 +1152,7 @@ const de_DeleteLaunchConfigurationCommand = async (output, context) => {
1164
1152
  const response = {
1165
1153
  $metadata: deserializeMetadata(output),
1166
1154
  };
1167
- return Promise.resolve(response);
1155
+ return response;
1168
1156
  };
1169
1157
  exports.de_DeleteLaunchConfigurationCommand = de_DeleteLaunchConfigurationCommand;
1170
1158
  const de_DeleteLaunchConfigurationCommandError = async (output, context) => {
@@ -1182,10 +1170,9 @@ const de_DeleteLaunchConfigurationCommandError = async (output, context) => {
1182
1170
  throw await de_ResourceInUseFaultRes(parsedOutput, context);
1183
1171
  default:
1184
1172
  const parsedBody = parsedOutput.body;
1185
- (0, smithy_client_1.throwDefaultError)({
1173
+ return throwDefaultError({
1186
1174
  output,
1187
1175
  parsedBody: parsedBody.Error,
1188
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
1189
1176
  errorCode,
1190
1177
  });
1191
1178
  }
@@ -1201,7 +1188,7 @@ const de_DeleteLifecycleHookCommand = async (output, context) => {
1201
1188
  $metadata: deserializeMetadata(output),
1202
1189
  ...contents,
1203
1190
  };
1204
- return Promise.resolve(response);
1191
+ return response;
1205
1192
  };
1206
1193
  exports.de_DeleteLifecycleHookCommand = de_DeleteLifecycleHookCommand;
1207
1194
  const de_DeleteLifecycleHookCommandError = async (output, context) => {
@@ -1216,10 +1203,9 @@ const de_DeleteLifecycleHookCommandError = async (output, context) => {
1216
1203
  throw await de_ResourceContentionFaultRes(parsedOutput, context);
1217
1204
  default:
1218
1205
  const parsedBody = parsedOutput.body;
1219
- (0, smithy_client_1.throwDefaultError)({
1206
+ return throwDefaultError({
1220
1207
  output,
1221
1208
  parsedBody: parsedBody.Error,
1222
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
1223
1209
  errorCode,
1224
1210
  });
1225
1211
  }
@@ -1232,7 +1218,7 @@ const de_DeleteNotificationConfigurationCommand = async (output, context) => {
1232
1218
  const response = {
1233
1219
  $metadata: deserializeMetadata(output),
1234
1220
  };
1235
- return Promise.resolve(response);
1221
+ return response;
1236
1222
  };
1237
1223
  exports.de_DeleteNotificationConfigurationCommand = de_DeleteNotificationConfigurationCommand;
1238
1224
  const de_DeleteNotificationConfigurationCommandError = async (output, context) => {
@@ -1247,10 +1233,9 @@ const de_DeleteNotificationConfigurationCommandError = async (output, context) =
1247
1233
  throw await de_ResourceContentionFaultRes(parsedOutput, context);
1248
1234
  default:
1249
1235
  const parsedBody = parsedOutput.body;
1250
- (0, smithy_client_1.throwDefaultError)({
1236
+ return throwDefaultError({
1251
1237
  output,
1252
1238
  parsedBody: parsedBody.Error,
1253
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
1254
1239
  errorCode,
1255
1240
  });
1256
1241
  }
@@ -1263,7 +1248,7 @@ const de_DeletePolicyCommand = async (output, context) => {
1263
1248
  const response = {
1264
1249
  $metadata: deserializeMetadata(output),
1265
1250
  };
1266
- return Promise.resolve(response);
1251
+ return response;
1267
1252
  };
1268
1253
  exports.de_DeletePolicyCommand = de_DeletePolicyCommand;
1269
1254
  const de_DeletePolicyCommandError = async (output, context) => {
@@ -1281,10 +1266,9 @@ const de_DeletePolicyCommandError = async (output, context) => {
1281
1266
  throw await de_ServiceLinkedRoleFailureRes(parsedOutput, context);
1282
1267
  default:
1283
1268
  const parsedBody = parsedOutput.body;
1284
- (0, smithy_client_1.throwDefaultError)({
1269
+ return throwDefaultError({
1285
1270
  output,
1286
1271
  parsedBody: parsedBody.Error,
1287
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
1288
1272
  errorCode,
1289
1273
  });
1290
1274
  }
@@ -1297,7 +1281,7 @@ const de_DeleteScheduledActionCommand = async (output, context) => {
1297
1281
  const response = {
1298
1282
  $metadata: deserializeMetadata(output),
1299
1283
  };
1300
- return Promise.resolve(response);
1284
+ return response;
1301
1285
  };
1302
1286
  exports.de_DeleteScheduledActionCommand = de_DeleteScheduledActionCommand;
1303
1287
  const de_DeleteScheduledActionCommandError = async (output, context) => {
@@ -1312,10 +1296,9 @@ const de_DeleteScheduledActionCommandError = async (output, context) => {
1312
1296
  throw await de_ResourceContentionFaultRes(parsedOutput, context);
1313
1297
  default:
1314
1298
  const parsedBody = parsedOutput.body;
1315
- (0, smithy_client_1.throwDefaultError)({
1299
+ return throwDefaultError({
1316
1300
  output,
1317
1301
  parsedBody: parsedBody.Error,
1318
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
1319
1302
  errorCode,
1320
1303
  });
1321
1304
  }
@@ -1328,7 +1311,7 @@ const de_DeleteTagsCommand = async (output, context) => {
1328
1311
  const response = {
1329
1312
  $metadata: deserializeMetadata(output),
1330
1313
  };
1331
- return Promise.resolve(response);
1314
+ return response;
1332
1315
  };
1333
1316
  exports.de_DeleteTagsCommand = de_DeleteTagsCommand;
1334
1317
  const de_DeleteTagsCommandError = async (output, context) => {
@@ -1346,10 +1329,9 @@ const de_DeleteTagsCommandError = async (output, context) => {
1346
1329
  throw await de_ResourceInUseFaultRes(parsedOutput, context);
1347
1330
  default:
1348
1331
  const parsedBody = parsedOutput.body;
1349
- (0, smithy_client_1.throwDefaultError)({
1332
+ return throwDefaultError({
1350
1333
  output,
1351
1334
  parsedBody: parsedBody.Error,
1352
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
1353
1335
  errorCode,
1354
1336
  });
1355
1337
  }
@@ -1365,7 +1347,7 @@ const de_DeleteWarmPoolCommand = async (output, context) => {
1365
1347
  $metadata: deserializeMetadata(output),
1366
1348
  ...contents,
1367
1349
  };
1368
- return Promise.resolve(response);
1350
+ return response;
1369
1351
  };
1370
1352
  exports.de_DeleteWarmPoolCommand = de_DeleteWarmPoolCommand;
1371
1353
  const de_DeleteWarmPoolCommandError = async (output, context) => {
@@ -1389,10 +1371,9 @@ const de_DeleteWarmPoolCommandError = async (output, context) => {
1389
1371
  throw await de_ScalingActivityInProgressFaultRes(parsedOutput, context);
1390
1372
  default:
1391
1373
  const parsedBody = parsedOutput.body;
1392
- (0, smithy_client_1.throwDefaultError)({
1374
+ return throwDefaultError({
1393
1375
  output,
1394
1376
  parsedBody: parsedBody.Error,
1395
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
1396
1377
  errorCode,
1397
1378
  });
1398
1379
  }
@@ -1408,7 +1389,7 @@ const de_DescribeAccountLimitsCommand = async (output, context) => {
1408
1389
  $metadata: deserializeMetadata(output),
1409
1390
  ...contents,
1410
1391
  };
1411
- return Promise.resolve(response);
1392
+ return response;
1412
1393
  };
1413
1394
  exports.de_DescribeAccountLimitsCommand = de_DescribeAccountLimitsCommand;
1414
1395
  const de_DescribeAccountLimitsCommandError = async (output, context) => {
@@ -1423,10 +1404,9 @@ const de_DescribeAccountLimitsCommandError = async (output, context) => {
1423
1404
  throw await de_ResourceContentionFaultRes(parsedOutput, context);
1424
1405
  default:
1425
1406
  const parsedBody = parsedOutput.body;
1426
- (0, smithy_client_1.throwDefaultError)({
1407
+ return throwDefaultError({
1427
1408
  output,
1428
1409
  parsedBody: parsedBody.Error,
1429
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
1430
1410
  errorCode,
1431
1411
  });
1432
1412
  }
@@ -1442,7 +1422,7 @@ const de_DescribeAdjustmentTypesCommand = async (output, context) => {
1442
1422
  $metadata: deserializeMetadata(output),
1443
1423
  ...contents,
1444
1424
  };
1445
- return Promise.resolve(response);
1425
+ return response;
1446
1426
  };
1447
1427
  exports.de_DescribeAdjustmentTypesCommand = de_DescribeAdjustmentTypesCommand;
1448
1428
  const de_DescribeAdjustmentTypesCommandError = async (output, context) => {
@@ -1457,10 +1437,9 @@ const de_DescribeAdjustmentTypesCommandError = async (output, context) => {
1457
1437
  throw await de_ResourceContentionFaultRes(parsedOutput, context);
1458
1438
  default:
1459
1439
  const parsedBody = parsedOutput.body;
1460
- (0, smithy_client_1.throwDefaultError)({
1440
+ return throwDefaultError({
1461
1441
  output,
1462
1442
  parsedBody: parsedBody.Error,
1463
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
1464
1443
  errorCode,
1465
1444
  });
1466
1445
  }
@@ -1476,7 +1455,7 @@ const de_DescribeAutoScalingGroupsCommand = async (output, context) => {
1476
1455
  $metadata: deserializeMetadata(output),
1477
1456
  ...contents,
1478
1457
  };
1479
- return Promise.resolve(response);
1458
+ return response;
1480
1459
  };
1481
1460
  exports.de_DescribeAutoScalingGroupsCommand = de_DescribeAutoScalingGroupsCommand;
1482
1461
  const de_DescribeAutoScalingGroupsCommandError = async (output, context) => {
@@ -1494,10 +1473,9 @@ const de_DescribeAutoScalingGroupsCommandError = async (output, context) => {
1494
1473
  throw await de_ResourceContentionFaultRes(parsedOutput, context);
1495
1474
  default:
1496
1475
  const parsedBody = parsedOutput.body;
1497
- (0, smithy_client_1.throwDefaultError)({
1476
+ return throwDefaultError({
1498
1477
  output,
1499
1478
  parsedBody: parsedBody.Error,
1500
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
1501
1479
  errorCode,
1502
1480
  });
1503
1481
  }
@@ -1513,7 +1491,7 @@ const de_DescribeAutoScalingInstancesCommand = async (output, context) => {
1513
1491
  $metadata: deserializeMetadata(output),
1514
1492
  ...contents,
1515
1493
  };
1516
- return Promise.resolve(response);
1494
+ return response;
1517
1495
  };
1518
1496
  exports.de_DescribeAutoScalingInstancesCommand = de_DescribeAutoScalingInstancesCommand;
1519
1497
  const de_DescribeAutoScalingInstancesCommandError = async (output, context) => {
@@ -1531,10 +1509,9 @@ const de_DescribeAutoScalingInstancesCommandError = async (output, context) => {
1531
1509
  throw await de_ResourceContentionFaultRes(parsedOutput, context);
1532
1510
  default:
1533
1511
  const parsedBody = parsedOutput.body;
1534
- (0, smithy_client_1.throwDefaultError)({
1512
+ return throwDefaultError({
1535
1513
  output,
1536
1514
  parsedBody: parsedBody.Error,
1537
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
1538
1515
  errorCode,
1539
1516
  });
1540
1517
  }
@@ -1550,7 +1527,7 @@ const de_DescribeAutoScalingNotificationTypesCommand = async (output, context) =
1550
1527
  $metadata: deserializeMetadata(output),
1551
1528
  ...contents,
1552
1529
  };
1553
- return Promise.resolve(response);
1530
+ return response;
1554
1531
  };
1555
1532
  exports.de_DescribeAutoScalingNotificationTypesCommand = de_DescribeAutoScalingNotificationTypesCommand;
1556
1533
  const de_DescribeAutoScalingNotificationTypesCommandError = async (output, context) => {
@@ -1565,10 +1542,9 @@ const de_DescribeAutoScalingNotificationTypesCommandError = async (output, conte
1565
1542
  throw await de_ResourceContentionFaultRes(parsedOutput, context);
1566
1543
  default:
1567
1544
  const parsedBody = parsedOutput.body;
1568
- (0, smithy_client_1.throwDefaultError)({
1545
+ return throwDefaultError({
1569
1546
  output,
1570
1547
  parsedBody: parsedBody.Error,
1571
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
1572
1548
  errorCode,
1573
1549
  });
1574
1550
  }
@@ -1584,7 +1560,7 @@ const de_DescribeInstanceRefreshesCommand = async (output, context) => {
1584
1560
  $metadata: deserializeMetadata(output),
1585
1561
  ...contents,
1586
1562
  };
1587
- return Promise.resolve(response);
1563
+ return response;
1588
1564
  };
1589
1565
  exports.de_DescribeInstanceRefreshesCommand = de_DescribeInstanceRefreshesCommand;
1590
1566
  const de_DescribeInstanceRefreshesCommandError = async (output, context) => {
@@ -1602,10 +1578,9 @@ const de_DescribeInstanceRefreshesCommandError = async (output, context) => {
1602
1578
  throw await de_ResourceContentionFaultRes(parsedOutput, context);
1603
1579
  default:
1604
1580
  const parsedBody = parsedOutput.body;
1605
- (0, smithy_client_1.throwDefaultError)({
1581
+ return throwDefaultError({
1606
1582
  output,
1607
1583
  parsedBody: parsedBody.Error,
1608
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
1609
1584
  errorCode,
1610
1585
  });
1611
1586
  }
@@ -1621,7 +1596,7 @@ const de_DescribeLaunchConfigurationsCommand = async (output, context) => {
1621
1596
  $metadata: deserializeMetadata(output),
1622
1597
  ...contents,
1623
1598
  };
1624
- return Promise.resolve(response);
1599
+ return response;
1625
1600
  };
1626
1601
  exports.de_DescribeLaunchConfigurationsCommand = de_DescribeLaunchConfigurationsCommand;
1627
1602
  const de_DescribeLaunchConfigurationsCommandError = async (output, context) => {
@@ -1639,10 +1614,9 @@ const de_DescribeLaunchConfigurationsCommandError = async (output, context) => {
1639
1614
  throw await de_ResourceContentionFaultRes(parsedOutput, context);
1640
1615
  default:
1641
1616
  const parsedBody = parsedOutput.body;
1642
- (0, smithy_client_1.throwDefaultError)({
1617
+ return throwDefaultError({
1643
1618
  output,
1644
1619
  parsedBody: parsedBody.Error,
1645
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
1646
1620
  errorCode,
1647
1621
  });
1648
1622
  }
@@ -1658,7 +1632,7 @@ const de_DescribeLifecycleHooksCommand = async (output, context) => {
1658
1632
  $metadata: deserializeMetadata(output),
1659
1633
  ...contents,
1660
1634
  };
1661
- return Promise.resolve(response);
1635
+ return response;
1662
1636
  };
1663
1637
  exports.de_DescribeLifecycleHooksCommand = de_DescribeLifecycleHooksCommand;
1664
1638
  const de_DescribeLifecycleHooksCommandError = async (output, context) => {
@@ -1673,10 +1647,9 @@ const de_DescribeLifecycleHooksCommandError = async (output, context) => {
1673
1647
  throw await de_ResourceContentionFaultRes(parsedOutput, context);
1674
1648
  default:
1675
1649
  const parsedBody = parsedOutput.body;
1676
- (0, smithy_client_1.throwDefaultError)({
1650
+ return throwDefaultError({
1677
1651
  output,
1678
1652
  parsedBody: parsedBody.Error,
1679
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
1680
1653
  errorCode,
1681
1654
  });
1682
1655
  }
@@ -1692,7 +1665,7 @@ const de_DescribeLifecycleHookTypesCommand = async (output, context) => {
1692
1665
  $metadata: deserializeMetadata(output),
1693
1666
  ...contents,
1694
1667
  };
1695
- return Promise.resolve(response);
1668
+ return response;
1696
1669
  };
1697
1670
  exports.de_DescribeLifecycleHookTypesCommand = de_DescribeLifecycleHookTypesCommand;
1698
1671
  const de_DescribeLifecycleHookTypesCommandError = async (output, context) => {
@@ -1707,10 +1680,9 @@ const de_DescribeLifecycleHookTypesCommandError = async (output, context) => {
1707
1680
  throw await de_ResourceContentionFaultRes(parsedOutput, context);
1708
1681
  default:
1709
1682
  const parsedBody = parsedOutput.body;
1710
- (0, smithy_client_1.throwDefaultError)({
1683
+ return throwDefaultError({
1711
1684
  output,
1712
1685
  parsedBody: parsedBody.Error,
1713
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
1714
1686
  errorCode,
1715
1687
  });
1716
1688
  }
@@ -1726,7 +1698,7 @@ const de_DescribeLoadBalancersCommand = async (output, context) => {
1726
1698
  $metadata: deserializeMetadata(output),
1727
1699
  ...contents,
1728
1700
  };
1729
- return Promise.resolve(response);
1701
+ return response;
1730
1702
  };
1731
1703
  exports.de_DescribeLoadBalancersCommand = de_DescribeLoadBalancersCommand;
1732
1704
  const de_DescribeLoadBalancersCommandError = async (output, context) => {
@@ -1744,10 +1716,9 @@ const de_DescribeLoadBalancersCommandError = async (output, context) => {
1744
1716
  throw await de_ResourceContentionFaultRes(parsedOutput, context);
1745
1717
  default:
1746
1718
  const parsedBody = parsedOutput.body;
1747
- (0, smithy_client_1.throwDefaultError)({
1719
+ return throwDefaultError({
1748
1720
  output,
1749
1721
  parsedBody: parsedBody.Error,
1750
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
1751
1722
  errorCode,
1752
1723
  });
1753
1724
  }
@@ -1763,7 +1734,7 @@ const de_DescribeLoadBalancerTargetGroupsCommand = async (output, context) => {
1763
1734
  $metadata: deserializeMetadata(output),
1764
1735
  ...contents,
1765
1736
  };
1766
- return Promise.resolve(response);
1737
+ return response;
1767
1738
  };
1768
1739
  exports.de_DescribeLoadBalancerTargetGroupsCommand = de_DescribeLoadBalancerTargetGroupsCommand;
1769
1740
  const de_DescribeLoadBalancerTargetGroupsCommandError = async (output, context) => {
@@ -1781,10 +1752,9 @@ const de_DescribeLoadBalancerTargetGroupsCommandError = async (output, context)
1781
1752
  throw await de_ResourceContentionFaultRes(parsedOutput, context);
1782
1753
  default:
1783
1754
  const parsedBody = parsedOutput.body;
1784
- (0, smithy_client_1.throwDefaultError)({
1755
+ return throwDefaultError({
1785
1756
  output,
1786
1757
  parsedBody: parsedBody.Error,
1787
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
1788
1758
  errorCode,
1789
1759
  });
1790
1760
  }
@@ -1800,7 +1770,7 @@ const de_DescribeMetricCollectionTypesCommand = async (output, context) => {
1800
1770
  $metadata: deserializeMetadata(output),
1801
1771
  ...contents,
1802
1772
  };
1803
- return Promise.resolve(response);
1773
+ return response;
1804
1774
  };
1805
1775
  exports.de_DescribeMetricCollectionTypesCommand = de_DescribeMetricCollectionTypesCommand;
1806
1776
  const de_DescribeMetricCollectionTypesCommandError = async (output, context) => {
@@ -1815,10 +1785,9 @@ const de_DescribeMetricCollectionTypesCommandError = async (output, context) =>
1815
1785
  throw await de_ResourceContentionFaultRes(parsedOutput, context);
1816
1786
  default:
1817
1787
  const parsedBody = parsedOutput.body;
1818
- (0, smithy_client_1.throwDefaultError)({
1788
+ return throwDefaultError({
1819
1789
  output,
1820
1790
  parsedBody: parsedBody.Error,
1821
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
1822
1791
  errorCode,
1823
1792
  });
1824
1793
  }
@@ -1834,7 +1803,7 @@ const de_DescribeNotificationConfigurationsCommand = async (output, context) =>
1834
1803
  $metadata: deserializeMetadata(output),
1835
1804
  ...contents,
1836
1805
  };
1837
- return Promise.resolve(response);
1806
+ return response;
1838
1807
  };
1839
1808
  exports.de_DescribeNotificationConfigurationsCommand = de_DescribeNotificationConfigurationsCommand;
1840
1809
  const de_DescribeNotificationConfigurationsCommandError = async (output, context) => {
@@ -1852,10 +1821,9 @@ const de_DescribeNotificationConfigurationsCommandError = async (output, context
1852
1821
  throw await de_ResourceContentionFaultRes(parsedOutput, context);
1853
1822
  default:
1854
1823
  const parsedBody = parsedOutput.body;
1855
- (0, smithy_client_1.throwDefaultError)({
1824
+ return throwDefaultError({
1856
1825
  output,
1857
1826
  parsedBody: parsedBody.Error,
1858
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
1859
1827
  errorCode,
1860
1828
  });
1861
1829
  }
@@ -1871,7 +1839,7 @@ const de_DescribePoliciesCommand = async (output, context) => {
1871
1839
  $metadata: deserializeMetadata(output),
1872
1840
  ...contents,
1873
1841
  };
1874
- return Promise.resolve(response);
1842
+ return response;
1875
1843
  };
1876
1844
  exports.de_DescribePoliciesCommand = de_DescribePoliciesCommand;
1877
1845
  const de_DescribePoliciesCommandError = async (output, context) => {
@@ -1892,10 +1860,9 @@ const de_DescribePoliciesCommandError = async (output, context) => {
1892
1860
  throw await de_ServiceLinkedRoleFailureRes(parsedOutput, context);
1893
1861
  default:
1894
1862
  const parsedBody = parsedOutput.body;
1895
- (0, smithy_client_1.throwDefaultError)({
1863
+ return throwDefaultError({
1896
1864
  output,
1897
1865
  parsedBody: parsedBody.Error,
1898
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
1899
1866
  errorCode,
1900
1867
  });
1901
1868
  }
@@ -1911,7 +1878,7 @@ const de_DescribeScalingActivitiesCommand = async (output, context) => {
1911
1878
  $metadata: deserializeMetadata(output),
1912
1879
  ...contents,
1913
1880
  };
1914
- return Promise.resolve(response);
1881
+ return response;
1915
1882
  };
1916
1883
  exports.de_DescribeScalingActivitiesCommand = de_DescribeScalingActivitiesCommand;
1917
1884
  const de_DescribeScalingActivitiesCommandError = async (output, context) => {
@@ -1929,10 +1896,9 @@ const de_DescribeScalingActivitiesCommandError = async (output, context) => {
1929
1896
  throw await de_ResourceContentionFaultRes(parsedOutput, context);
1930
1897
  default:
1931
1898
  const parsedBody = parsedOutput.body;
1932
- (0, smithy_client_1.throwDefaultError)({
1899
+ return throwDefaultError({
1933
1900
  output,
1934
1901
  parsedBody: parsedBody.Error,
1935
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
1936
1902
  errorCode,
1937
1903
  });
1938
1904
  }
@@ -1948,7 +1914,7 @@ const de_DescribeScalingProcessTypesCommand = async (output, context) => {
1948
1914
  $metadata: deserializeMetadata(output),
1949
1915
  ...contents,
1950
1916
  };
1951
- return Promise.resolve(response);
1917
+ return response;
1952
1918
  };
1953
1919
  exports.de_DescribeScalingProcessTypesCommand = de_DescribeScalingProcessTypesCommand;
1954
1920
  const de_DescribeScalingProcessTypesCommandError = async (output, context) => {
@@ -1963,10 +1929,9 @@ const de_DescribeScalingProcessTypesCommandError = async (output, context) => {
1963
1929
  throw await de_ResourceContentionFaultRes(parsedOutput, context);
1964
1930
  default:
1965
1931
  const parsedBody = parsedOutput.body;
1966
- (0, smithy_client_1.throwDefaultError)({
1932
+ return throwDefaultError({
1967
1933
  output,
1968
1934
  parsedBody: parsedBody.Error,
1969
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
1970
1935
  errorCode,
1971
1936
  });
1972
1937
  }
@@ -1982,7 +1947,7 @@ const de_DescribeScheduledActionsCommand = async (output, context) => {
1982
1947
  $metadata: deserializeMetadata(output),
1983
1948
  ...contents,
1984
1949
  };
1985
- return Promise.resolve(response);
1950
+ return response;
1986
1951
  };
1987
1952
  exports.de_DescribeScheduledActionsCommand = de_DescribeScheduledActionsCommand;
1988
1953
  const de_DescribeScheduledActionsCommandError = async (output, context) => {
@@ -2000,10 +1965,9 @@ const de_DescribeScheduledActionsCommandError = async (output, context) => {
2000
1965
  throw await de_ResourceContentionFaultRes(parsedOutput, context);
2001
1966
  default:
2002
1967
  const parsedBody = parsedOutput.body;
2003
- (0, smithy_client_1.throwDefaultError)({
1968
+ return throwDefaultError({
2004
1969
  output,
2005
1970
  parsedBody: parsedBody.Error,
2006
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
2007
1971
  errorCode,
2008
1972
  });
2009
1973
  }
@@ -2019,7 +1983,7 @@ const de_DescribeTagsCommand = async (output, context) => {
2019
1983
  $metadata: deserializeMetadata(output),
2020
1984
  ...contents,
2021
1985
  };
2022
- return Promise.resolve(response);
1986
+ return response;
2023
1987
  };
2024
1988
  exports.de_DescribeTagsCommand = de_DescribeTagsCommand;
2025
1989
  const de_DescribeTagsCommandError = async (output, context) => {
@@ -2037,10 +2001,9 @@ const de_DescribeTagsCommandError = async (output, context) => {
2037
2001
  throw await de_ResourceContentionFaultRes(parsedOutput, context);
2038
2002
  default:
2039
2003
  const parsedBody = parsedOutput.body;
2040
- (0, smithy_client_1.throwDefaultError)({
2004
+ return throwDefaultError({
2041
2005
  output,
2042
2006
  parsedBody: parsedBody.Error,
2043
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
2044
2007
  errorCode,
2045
2008
  });
2046
2009
  }
@@ -2056,7 +2019,7 @@ const de_DescribeTerminationPolicyTypesCommand = async (output, context) => {
2056
2019
  $metadata: deserializeMetadata(output),
2057
2020
  ...contents,
2058
2021
  };
2059
- return Promise.resolve(response);
2022
+ return response;
2060
2023
  };
2061
2024
  exports.de_DescribeTerminationPolicyTypesCommand = de_DescribeTerminationPolicyTypesCommand;
2062
2025
  const de_DescribeTerminationPolicyTypesCommandError = async (output, context) => {
@@ -2071,10 +2034,9 @@ const de_DescribeTerminationPolicyTypesCommandError = async (output, context) =>
2071
2034
  throw await de_ResourceContentionFaultRes(parsedOutput, context);
2072
2035
  default:
2073
2036
  const parsedBody = parsedOutput.body;
2074
- (0, smithy_client_1.throwDefaultError)({
2037
+ return throwDefaultError({
2075
2038
  output,
2076
2039
  parsedBody: parsedBody.Error,
2077
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
2078
2040
  errorCode,
2079
2041
  });
2080
2042
  }
@@ -2090,7 +2052,7 @@ const de_DescribeTrafficSourcesCommand = async (output, context) => {
2090
2052
  $metadata: deserializeMetadata(output),
2091
2053
  ...contents,
2092
2054
  };
2093
- return Promise.resolve(response);
2055
+ return response;
2094
2056
  };
2095
2057
  exports.de_DescribeTrafficSourcesCommand = de_DescribeTrafficSourcesCommand;
2096
2058
  const de_DescribeTrafficSourcesCommandError = async (output, context) => {
@@ -2108,10 +2070,9 @@ const de_DescribeTrafficSourcesCommandError = async (output, context) => {
2108
2070
  throw await de_ResourceContentionFaultRes(parsedOutput, context);
2109
2071
  default:
2110
2072
  const parsedBody = parsedOutput.body;
2111
- (0, smithy_client_1.throwDefaultError)({
2073
+ return throwDefaultError({
2112
2074
  output,
2113
2075
  parsedBody: parsedBody.Error,
2114
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
2115
2076
  errorCode,
2116
2077
  });
2117
2078
  }
@@ -2127,7 +2088,7 @@ const de_DescribeWarmPoolCommand = async (output, context) => {
2127
2088
  $metadata: deserializeMetadata(output),
2128
2089
  ...contents,
2129
2090
  };
2130
- return Promise.resolve(response);
2091
+ return response;
2131
2092
  };
2132
2093
  exports.de_DescribeWarmPoolCommand = de_DescribeWarmPoolCommand;
2133
2094
  const de_DescribeWarmPoolCommandError = async (output, context) => {
@@ -2148,10 +2109,9 @@ const de_DescribeWarmPoolCommandError = async (output, context) => {
2148
2109
  throw await de_ResourceContentionFaultRes(parsedOutput, context);
2149
2110
  default:
2150
2111
  const parsedBody = parsedOutput.body;
2151
- (0, smithy_client_1.throwDefaultError)({
2112
+ return throwDefaultError({
2152
2113
  output,
2153
2114
  parsedBody: parsedBody.Error,
2154
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
2155
2115
  errorCode,
2156
2116
  });
2157
2117
  }
@@ -2167,7 +2127,7 @@ const de_DetachInstancesCommand = async (output, context) => {
2167
2127
  $metadata: deserializeMetadata(output),
2168
2128
  ...contents,
2169
2129
  };
2170
- return Promise.resolve(response);
2130
+ return response;
2171
2131
  };
2172
2132
  exports.de_DetachInstancesCommand = de_DetachInstancesCommand;
2173
2133
  const de_DetachInstancesCommandError = async (output, context) => {
@@ -2182,10 +2142,9 @@ const de_DetachInstancesCommandError = async (output, context) => {
2182
2142
  throw await de_ResourceContentionFaultRes(parsedOutput, context);
2183
2143
  default:
2184
2144
  const parsedBody = parsedOutput.body;
2185
- (0, smithy_client_1.throwDefaultError)({
2145
+ return throwDefaultError({
2186
2146
  output,
2187
2147
  parsedBody: parsedBody.Error,
2188
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
2189
2148
  errorCode,
2190
2149
  });
2191
2150
  }
@@ -2201,7 +2160,7 @@ const de_DetachLoadBalancersCommand = async (output, context) => {
2201
2160
  $metadata: deserializeMetadata(output),
2202
2161
  ...contents,
2203
2162
  };
2204
- return Promise.resolve(response);
2163
+ return response;
2205
2164
  };
2206
2165
  exports.de_DetachLoadBalancersCommand = de_DetachLoadBalancersCommand;
2207
2166
  const de_DetachLoadBalancersCommandError = async (output, context) => {
@@ -2216,10 +2175,9 @@ const de_DetachLoadBalancersCommandError = async (output, context) => {
2216
2175
  throw await de_ResourceContentionFaultRes(parsedOutput, context);
2217
2176
  default:
2218
2177
  const parsedBody = parsedOutput.body;
2219
- (0, smithy_client_1.throwDefaultError)({
2178
+ return throwDefaultError({
2220
2179
  output,
2221
2180
  parsedBody: parsedBody.Error,
2222
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
2223
2181
  errorCode,
2224
2182
  });
2225
2183
  }
@@ -2235,7 +2193,7 @@ const de_DetachLoadBalancerTargetGroupsCommand = async (output, context) => {
2235
2193
  $metadata: deserializeMetadata(output),
2236
2194
  ...contents,
2237
2195
  };
2238
- return Promise.resolve(response);
2196
+ return response;
2239
2197
  };
2240
2198
  exports.de_DetachLoadBalancerTargetGroupsCommand = de_DetachLoadBalancerTargetGroupsCommand;
2241
2199
  const de_DetachLoadBalancerTargetGroupsCommandError = async (output, context) => {
@@ -2250,10 +2208,9 @@ const de_DetachLoadBalancerTargetGroupsCommandError = async (output, context) =>
2250
2208
  throw await de_ResourceContentionFaultRes(parsedOutput, context);
2251
2209
  default:
2252
2210
  const parsedBody = parsedOutput.body;
2253
- (0, smithy_client_1.throwDefaultError)({
2211
+ return throwDefaultError({
2254
2212
  output,
2255
2213
  parsedBody: parsedBody.Error,
2256
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
2257
2214
  errorCode,
2258
2215
  });
2259
2216
  }
@@ -2269,7 +2226,7 @@ const de_DetachTrafficSourcesCommand = async (output, context) => {
2269
2226
  $metadata: deserializeMetadata(output),
2270
2227
  ...contents,
2271
2228
  };
2272
- return Promise.resolve(response);
2229
+ return response;
2273
2230
  };
2274
2231
  exports.de_DetachTrafficSourcesCommand = de_DetachTrafficSourcesCommand;
2275
2232
  const de_DetachTrafficSourcesCommandError = async (output, context) => {
@@ -2284,10 +2241,9 @@ const de_DetachTrafficSourcesCommandError = async (output, context) => {
2284
2241
  throw await de_ResourceContentionFaultRes(parsedOutput, context);
2285
2242
  default:
2286
2243
  const parsedBody = parsedOutput.body;
2287
- (0, smithy_client_1.throwDefaultError)({
2244
+ return throwDefaultError({
2288
2245
  output,
2289
2246
  parsedBody: parsedBody.Error,
2290
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
2291
2247
  errorCode,
2292
2248
  });
2293
2249
  }
@@ -2300,7 +2256,7 @@ const de_DisableMetricsCollectionCommand = async (output, context) => {
2300
2256
  const response = {
2301
2257
  $metadata: deserializeMetadata(output),
2302
2258
  };
2303
- return Promise.resolve(response);
2259
+ return response;
2304
2260
  };
2305
2261
  exports.de_DisableMetricsCollectionCommand = de_DisableMetricsCollectionCommand;
2306
2262
  const de_DisableMetricsCollectionCommandError = async (output, context) => {
@@ -2315,10 +2271,9 @@ const de_DisableMetricsCollectionCommandError = async (output, context) => {
2315
2271
  throw await de_ResourceContentionFaultRes(parsedOutput, context);
2316
2272
  default:
2317
2273
  const parsedBody = parsedOutput.body;
2318
- (0, smithy_client_1.throwDefaultError)({
2274
+ return throwDefaultError({
2319
2275
  output,
2320
2276
  parsedBody: parsedBody.Error,
2321
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
2322
2277
  errorCode,
2323
2278
  });
2324
2279
  }
@@ -2331,7 +2286,7 @@ const de_EnableMetricsCollectionCommand = async (output, context) => {
2331
2286
  const response = {
2332
2287
  $metadata: deserializeMetadata(output),
2333
2288
  };
2334
- return Promise.resolve(response);
2289
+ return response;
2335
2290
  };
2336
2291
  exports.de_EnableMetricsCollectionCommand = de_EnableMetricsCollectionCommand;
2337
2292
  const de_EnableMetricsCollectionCommandError = async (output, context) => {
@@ -2346,10 +2301,9 @@ const de_EnableMetricsCollectionCommandError = async (output, context) => {
2346
2301
  throw await de_ResourceContentionFaultRes(parsedOutput, context);
2347
2302
  default:
2348
2303
  const parsedBody = parsedOutput.body;
2349
- (0, smithy_client_1.throwDefaultError)({
2304
+ return throwDefaultError({
2350
2305
  output,
2351
2306
  parsedBody: parsedBody.Error,
2352
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
2353
2307
  errorCode,
2354
2308
  });
2355
2309
  }
@@ -2365,7 +2319,7 @@ const de_EnterStandbyCommand = async (output, context) => {
2365
2319
  $metadata: deserializeMetadata(output),
2366
2320
  ...contents,
2367
2321
  };
2368
- return Promise.resolve(response);
2322
+ return response;
2369
2323
  };
2370
2324
  exports.de_EnterStandbyCommand = de_EnterStandbyCommand;
2371
2325
  const de_EnterStandbyCommandError = async (output, context) => {
@@ -2380,10 +2334,9 @@ const de_EnterStandbyCommandError = async (output, context) => {
2380
2334
  throw await de_ResourceContentionFaultRes(parsedOutput, context);
2381
2335
  default:
2382
2336
  const parsedBody = parsedOutput.body;
2383
- (0, smithy_client_1.throwDefaultError)({
2337
+ return throwDefaultError({
2384
2338
  output,
2385
2339
  parsedBody: parsedBody.Error,
2386
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
2387
2340
  errorCode,
2388
2341
  });
2389
2342
  }
@@ -2396,7 +2349,7 @@ const de_ExecutePolicyCommand = async (output, context) => {
2396
2349
  const response = {
2397
2350
  $metadata: deserializeMetadata(output),
2398
2351
  };
2399
- return Promise.resolve(response);
2352
+ return response;
2400
2353
  };
2401
2354
  exports.de_ExecutePolicyCommand = de_ExecutePolicyCommand;
2402
2355
  const de_ExecutePolicyCommandError = async (output, context) => {
@@ -2414,10 +2367,9 @@ const de_ExecutePolicyCommandError = async (output, context) => {
2414
2367
  throw await de_ScalingActivityInProgressFaultRes(parsedOutput, context);
2415
2368
  default:
2416
2369
  const parsedBody = parsedOutput.body;
2417
- (0, smithy_client_1.throwDefaultError)({
2370
+ return throwDefaultError({
2418
2371
  output,
2419
2372
  parsedBody: parsedBody.Error,
2420
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
2421
2373
  errorCode,
2422
2374
  });
2423
2375
  }
@@ -2433,7 +2385,7 @@ const de_ExitStandbyCommand = async (output, context) => {
2433
2385
  $metadata: deserializeMetadata(output),
2434
2386
  ...contents,
2435
2387
  };
2436
- return Promise.resolve(response);
2388
+ return response;
2437
2389
  };
2438
2390
  exports.de_ExitStandbyCommand = de_ExitStandbyCommand;
2439
2391
  const de_ExitStandbyCommandError = async (output, context) => {
@@ -2448,10 +2400,9 @@ const de_ExitStandbyCommandError = async (output, context) => {
2448
2400
  throw await de_ResourceContentionFaultRes(parsedOutput, context);
2449
2401
  default:
2450
2402
  const parsedBody = parsedOutput.body;
2451
- (0, smithy_client_1.throwDefaultError)({
2403
+ return throwDefaultError({
2452
2404
  output,
2453
2405
  parsedBody: parsedBody.Error,
2454
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
2455
2406
  errorCode,
2456
2407
  });
2457
2408
  }
@@ -2467,7 +2418,7 @@ const de_GetPredictiveScalingForecastCommand = async (output, context) => {
2467
2418
  $metadata: deserializeMetadata(output),
2468
2419
  ...contents,
2469
2420
  };
2470
- return Promise.resolve(response);
2421
+ return response;
2471
2422
  };
2472
2423
  exports.de_GetPredictiveScalingForecastCommand = de_GetPredictiveScalingForecastCommand;
2473
2424
  const de_GetPredictiveScalingForecastCommandError = async (output, context) => {
@@ -2482,10 +2433,9 @@ const de_GetPredictiveScalingForecastCommandError = async (output, context) => {
2482
2433
  throw await de_ResourceContentionFaultRes(parsedOutput, context);
2483
2434
  default:
2484
2435
  const parsedBody = parsedOutput.body;
2485
- (0, smithy_client_1.throwDefaultError)({
2436
+ return throwDefaultError({
2486
2437
  output,
2487
2438
  parsedBody: parsedBody.Error,
2488
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
2489
2439
  errorCode,
2490
2440
  });
2491
2441
  }
@@ -2501,7 +2451,7 @@ const de_PutLifecycleHookCommand = async (output, context) => {
2501
2451
  $metadata: deserializeMetadata(output),
2502
2452
  ...contents,
2503
2453
  };
2504
- return Promise.resolve(response);
2454
+ return response;
2505
2455
  };
2506
2456
  exports.de_PutLifecycleHookCommand = de_PutLifecycleHookCommand;
2507
2457
  const de_PutLifecycleHookCommandError = async (output, context) => {
@@ -2519,10 +2469,9 @@ const de_PutLifecycleHookCommandError = async (output, context) => {
2519
2469
  throw await de_ResourceContentionFaultRes(parsedOutput, context);
2520
2470
  default:
2521
2471
  const parsedBody = parsedOutput.body;
2522
- (0, smithy_client_1.throwDefaultError)({
2472
+ return throwDefaultError({
2523
2473
  output,
2524
2474
  parsedBody: parsedBody.Error,
2525
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
2526
2475
  errorCode,
2527
2476
  });
2528
2477
  }
@@ -2535,7 +2484,7 @@ const de_PutNotificationConfigurationCommand = async (output, context) => {
2535
2484
  const response = {
2536
2485
  $metadata: deserializeMetadata(output),
2537
2486
  };
2538
- return Promise.resolve(response);
2487
+ return response;
2539
2488
  };
2540
2489
  exports.de_PutNotificationConfigurationCommand = de_PutNotificationConfigurationCommand;
2541
2490
  const de_PutNotificationConfigurationCommandError = async (output, context) => {
@@ -2556,10 +2505,9 @@ const de_PutNotificationConfigurationCommandError = async (output, context) => {
2556
2505
  throw await de_ServiceLinkedRoleFailureRes(parsedOutput, context);
2557
2506
  default:
2558
2507
  const parsedBody = parsedOutput.body;
2559
- (0, smithy_client_1.throwDefaultError)({
2508
+ return throwDefaultError({
2560
2509
  output,
2561
2510
  parsedBody: parsedBody.Error,
2562
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
2563
2511
  errorCode,
2564
2512
  });
2565
2513
  }
@@ -2575,7 +2523,7 @@ const de_PutScalingPolicyCommand = async (output, context) => {
2575
2523
  $metadata: deserializeMetadata(output),
2576
2524
  ...contents,
2577
2525
  };
2578
- return Promise.resolve(response);
2526
+ return response;
2579
2527
  };
2580
2528
  exports.de_PutScalingPolicyCommand = de_PutScalingPolicyCommand;
2581
2529
  const de_PutScalingPolicyCommandError = async (output, context) => {
@@ -2596,10 +2544,9 @@ const de_PutScalingPolicyCommandError = async (output, context) => {
2596
2544
  throw await de_ServiceLinkedRoleFailureRes(parsedOutput, context);
2597
2545
  default:
2598
2546
  const parsedBody = parsedOutput.body;
2599
- (0, smithy_client_1.throwDefaultError)({
2547
+ return throwDefaultError({
2600
2548
  output,
2601
2549
  parsedBody: parsedBody.Error,
2602
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
2603
2550
  errorCode,
2604
2551
  });
2605
2552
  }
@@ -2612,7 +2559,7 @@ const de_PutScheduledUpdateGroupActionCommand = async (output, context) => {
2612
2559
  const response = {
2613
2560
  $metadata: deserializeMetadata(output),
2614
2561
  };
2615
- return Promise.resolve(response);
2562
+ return response;
2616
2563
  };
2617
2564
  exports.de_PutScheduledUpdateGroupActionCommand = de_PutScheduledUpdateGroupActionCommand;
2618
2565
  const de_PutScheduledUpdateGroupActionCommandError = async (output, context) => {
@@ -2633,10 +2580,9 @@ const de_PutScheduledUpdateGroupActionCommandError = async (output, context) =>
2633
2580
  throw await de_ResourceContentionFaultRes(parsedOutput, context);
2634
2581
  default:
2635
2582
  const parsedBody = parsedOutput.body;
2636
- (0, smithy_client_1.throwDefaultError)({
2583
+ return throwDefaultError({
2637
2584
  output,
2638
2585
  parsedBody: parsedBody.Error,
2639
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
2640
2586
  errorCode,
2641
2587
  });
2642
2588
  }
@@ -2652,7 +2598,7 @@ const de_PutWarmPoolCommand = async (output, context) => {
2652
2598
  $metadata: deserializeMetadata(output),
2653
2599
  ...contents,
2654
2600
  };
2655
- return Promise.resolve(response);
2601
+ return response;
2656
2602
  };
2657
2603
  exports.de_PutWarmPoolCommand = de_PutWarmPoolCommand;
2658
2604
  const de_PutWarmPoolCommandError = async (output, context) => {
@@ -2670,10 +2616,9 @@ const de_PutWarmPoolCommandError = async (output, context) => {
2670
2616
  throw await de_ResourceContentionFaultRes(parsedOutput, context);
2671
2617
  default:
2672
2618
  const parsedBody = parsedOutput.body;
2673
- (0, smithy_client_1.throwDefaultError)({
2619
+ return throwDefaultError({
2674
2620
  output,
2675
2621
  parsedBody: parsedBody.Error,
2676
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
2677
2622
  errorCode,
2678
2623
  });
2679
2624
  }
@@ -2689,7 +2634,7 @@ const de_RecordLifecycleActionHeartbeatCommand = async (output, context) => {
2689
2634
  $metadata: deserializeMetadata(output),
2690
2635
  ...contents,
2691
2636
  };
2692
- return Promise.resolve(response);
2637
+ return response;
2693
2638
  };
2694
2639
  exports.de_RecordLifecycleActionHeartbeatCommand = de_RecordLifecycleActionHeartbeatCommand;
2695
2640
  const de_RecordLifecycleActionHeartbeatCommandError = async (output, context) => {
@@ -2704,10 +2649,9 @@ const de_RecordLifecycleActionHeartbeatCommandError = async (output, context) =>
2704
2649
  throw await de_ResourceContentionFaultRes(parsedOutput, context);
2705
2650
  default:
2706
2651
  const parsedBody = parsedOutput.body;
2707
- (0, smithy_client_1.throwDefaultError)({
2652
+ return throwDefaultError({
2708
2653
  output,
2709
2654
  parsedBody: parsedBody.Error,
2710
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
2711
2655
  errorCode,
2712
2656
  });
2713
2657
  }
@@ -2720,7 +2664,7 @@ const de_ResumeProcessesCommand = async (output, context) => {
2720
2664
  const response = {
2721
2665
  $metadata: deserializeMetadata(output),
2722
2666
  };
2723
- return Promise.resolve(response);
2667
+ return response;
2724
2668
  };
2725
2669
  exports.de_ResumeProcessesCommand = de_ResumeProcessesCommand;
2726
2670
  const de_ResumeProcessesCommandError = async (output, context) => {
@@ -2738,10 +2682,9 @@ const de_ResumeProcessesCommandError = async (output, context) => {
2738
2682
  throw await de_ResourceInUseFaultRes(parsedOutput, context);
2739
2683
  default:
2740
2684
  const parsedBody = parsedOutput.body;
2741
- (0, smithy_client_1.throwDefaultError)({
2685
+ return throwDefaultError({
2742
2686
  output,
2743
2687
  parsedBody: parsedBody.Error,
2744
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
2745
2688
  errorCode,
2746
2689
  });
2747
2690
  }
@@ -2757,7 +2700,7 @@ const de_RollbackInstanceRefreshCommand = async (output, context) => {
2757
2700
  $metadata: deserializeMetadata(output),
2758
2701
  ...contents,
2759
2702
  };
2760
- return Promise.resolve(response);
2703
+ return response;
2761
2704
  };
2762
2705
  exports.de_RollbackInstanceRefreshCommand = de_RollbackInstanceRefreshCommand;
2763
2706
  const de_RollbackInstanceRefreshCommandError = async (output, context) => {
@@ -2781,10 +2724,9 @@ const de_RollbackInstanceRefreshCommandError = async (output, context) => {
2781
2724
  throw await de_ResourceContentionFaultRes(parsedOutput, context);
2782
2725
  default:
2783
2726
  const parsedBody = parsedOutput.body;
2784
- (0, smithy_client_1.throwDefaultError)({
2727
+ return throwDefaultError({
2785
2728
  output,
2786
2729
  parsedBody: parsedBody.Error,
2787
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
2788
2730
  errorCode,
2789
2731
  });
2790
2732
  }
@@ -2797,7 +2739,7 @@ const de_SetDesiredCapacityCommand = async (output, context) => {
2797
2739
  const response = {
2798
2740
  $metadata: deserializeMetadata(output),
2799
2741
  };
2800
- return Promise.resolve(response);
2742
+ return response;
2801
2743
  };
2802
2744
  exports.de_SetDesiredCapacityCommand = de_SetDesiredCapacityCommand;
2803
2745
  const de_SetDesiredCapacityCommandError = async (output, context) => {
@@ -2815,10 +2757,9 @@ const de_SetDesiredCapacityCommandError = async (output, context) => {
2815
2757
  throw await de_ScalingActivityInProgressFaultRes(parsedOutput, context);
2816
2758
  default:
2817
2759
  const parsedBody = parsedOutput.body;
2818
- (0, smithy_client_1.throwDefaultError)({
2760
+ return throwDefaultError({
2819
2761
  output,
2820
2762
  parsedBody: parsedBody.Error,
2821
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
2822
2763
  errorCode,
2823
2764
  });
2824
2765
  }
@@ -2831,7 +2772,7 @@ const de_SetInstanceHealthCommand = async (output, context) => {
2831
2772
  const response = {
2832
2773
  $metadata: deserializeMetadata(output),
2833
2774
  };
2834
- return Promise.resolve(response);
2775
+ return response;
2835
2776
  };
2836
2777
  exports.de_SetInstanceHealthCommand = de_SetInstanceHealthCommand;
2837
2778
  const de_SetInstanceHealthCommandError = async (output, context) => {
@@ -2846,10 +2787,9 @@ const de_SetInstanceHealthCommandError = async (output, context) => {
2846
2787
  throw await de_ResourceContentionFaultRes(parsedOutput, context);
2847
2788
  default:
2848
2789
  const parsedBody = parsedOutput.body;
2849
- (0, smithy_client_1.throwDefaultError)({
2790
+ return throwDefaultError({
2850
2791
  output,
2851
2792
  parsedBody: parsedBody.Error,
2852
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
2853
2793
  errorCode,
2854
2794
  });
2855
2795
  }
@@ -2865,7 +2805,7 @@ const de_SetInstanceProtectionCommand = async (output, context) => {
2865
2805
  $metadata: deserializeMetadata(output),
2866
2806
  ...contents,
2867
2807
  };
2868
- return Promise.resolve(response);
2808
+ return response;
2869
2809
  };
2870
2810
  exports.de_SetInstanceProtectionCommand = de_SetInstanceProtectionCommand;
2871
2811
  const de_SetInstanceProtectionCommandError = async (output, context) => {
@@ -2883,10 +2823,9 @@ const de_SetInstanceProtectionCommandError = async (output, context) => {
2883
2823
  throw await de_ResourceContentionFaultRes(parsedOutput, context);
2884
2824
  default:
2885
2825
  const parsedBody = parsedOutput.body;
2886
- (0, smithy_client_1.throwDefaultError)({
2826
+ return throwDefaultError({
2887
2827
  output,
2888
2828
  parsedBody: parsedBody.Error,
2889
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
2890
2829
  errorCode,
2891
2830
  });
2892
2831
  }
@@ -2902,7 +2841,7 @@ const de_StartInstanceRefreshCommand = async (output, context) => {
2902
2841
  $metadata: deserializeMetadata(output),
2903
2842
  ...contents,
2904
2843
  };
2905
- return Promise.resolve(response);
2844
+ return response;
2906
2845
  };
2907
2846
  exports.de_StartInstanceRefreshCommand = de_StartInstanceRefreshCommand;
2908
2847
  const de_StartInstanceRefreshCommandError = async (output, context) => {
@@ -2923,10 +2862,9 @@ const de_StartInstanceRefreshCommandError = async (output, context) => {
2923
2862
  throw await de_ResourceContentionFaultRes(parsedOutput, context);
2924
2863
  default:
2925
2864
  const parsedBody = parsedOutput.body;
2926
- (0, smithy_client_1.throwDefaultError)({
2865
+ return throwDefaultError({
2927
2866
  output,
2928
2867
  parsedBody: parsedBody.Error,
2929
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
2930
2868
  errorCode,
2931
2869
  });
2932
2870
  }
@@ -2939,7 +2877,7 @@ const de_SuspendProcessesCommand = async (output, context) => {
2939
2877
  const response = {
2940
2878
  $metadata: deserializeMetadata(output),
2941
2879
  };
2942
- return Promise.resolve(response);
2880
+ return response;
2943
2881
  };
2944
2882
  exports.de_SuspendProcessesCommand = de_SuspendProcessesCommand;
2945
2883
  const de_SuspendProcessesCommandError = async (output, context) => {
@@ -2957,10 +2895,9 @@ const de_SuspendProcessesCommandError = async (output, context) => {
2957
2895
  throw await de_ResourceInUseFaultRes(parsedOutput, context);
2958
2896
  default:
2959
2897
  const parsedBody = parsedOutput.body;
2960
- (0, smithy_client_1.throwDefaultError)({
2898
+ return throwDefaultError({
2961
2899
  output,
2962
2900
  parsedBody: parsedBody.Error,
2963
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
2964
2901
  errorCode,
2965
2902
  });
2966
2903
  }
@@ -2976,7 +2913,7 @@ const de_TerminateInstanceInAutoScalingGroupCommand = async (output, context) =>
2976
2913
  $metadata: deserializeMetadata(output),
2977
2914
  ...contents,
2978
2915
  };
2979
- return Promise.resolve(response);
2916
+ return response;
2980
2917
  };
2981
2918
  exports.de_TerminateInstanceInAutoScalingGroupCommand = de_TerminateInstanceInAutoScalingGroupCommand;
2982
2919
  const de_TerminateInstanceInAutoScalingGroupCommandError = async (output, context) => {
@@ -2994,10 +2931,9 @@ const de_TerminateInstanceInAutoScalingGroupCommandError = async (output, contex
2994
2931
  throw await de_ScalingActivityInProgressFaultRes(parsedOutput, context);
2995
2932
  default:
2996
2933
  const parsedBody = parsedOutput.body;
2997
- (0, smithy_client_1.throwDefaultError)({
2934
+ return throwDefaultError({
2998
2935
  output,
2999
2936
  parsedBody: parsedBody.Error,
3000
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
3001
2937
  errorCode,
3002
2938
  });
3003
2939
  }
@@ -3010,7 +2946,7 @@ const de_UpdateAutoScalingGroupCommand = async (output, context) => {
3010
2946
  const response = {
3011
2947
  $metadata: deserializeMetadata(output),
3012
2948
  };
3013
- return Promise.resolve(response);
2949
+ return response;
3014
2950
  };
3015
2951
  exports.de_UpdateAutoScalingGroupCommand = de_UpdateAutoScalingGroupCommand;
3016
2952
  const de_UpdateAutoScalingGroupCommandError = async (output, context) => {
@@ -3031,10 +2967,9 @@ const de_UpdateAutoScalingGroupCommandError = async (output, context) => {
3031
2967
  throw await de_ServiceLinkedRoleFailureRes(parsedOutput, context);
3032
2968
  default:
3033
2969
  const parsedBody = parsedOutput.body;
3034
- (0, smithy_client_1.throwDefaultError)({
2970
+ return throwDefaultError({
3035
2971
  output,
3036
2972
  parsedBody: parsedBody.Error,
3037
- exceptionCtor: AutoScalingServiceException_1.AutoScalingServiceException,
3038
2973
  errorCode,
3039
2974
  });
3040
2975
  }
@@ -8086,6 +8021,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
8086
8021
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
8087
8022
  };
8088
8023
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
8024
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(AutoScalingServiceException_1.AutoScalingServiceException);
8089
8025
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
8090
8026
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
8091
8027
  const contents = {