@aws-sdk/client-elastic-load-balancing-v2 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.
@@ -392,7 +392,7 @@ const de_AddListenerCertificatesCommand = async (output, context) => {
392
392
  $metadata: deserializeMetadata(output),
393
393
  ...contents,
394
394
  };
395
- return Promise.resolve(response);
395
+ return response;
396
396
  };
397
397
  exports.de_AddListenerCertificatesCommand = de_AddListenerCertificatesCommand;
398
398
  const de_AddListenerCertificatesCommandError = async (output, context) => {
@@ -413,10 +413,9 @@ const de_AddListenerCertificatesCommandError = async (output, context) => {
413
413
  throw await de_TooManyCertificatesExceptionRes(parsedOutput, context);
414
414
  default:
415
415
  const parsedBody = parsedOutput.body;
416
- (0, smithy_client_1.throwDefaultError)({
416
+ return throwDefaultError({
417
417
  output,
418
418
  parsedBody: parsedBody.Error,
419
- exceptionCtor: ElasticLoadBalancingV2ServiceException_1.ElasticLoadBalancingV2ServiceException,
420
419
  errorCode,
421
420
  });
422
421
  }
@@ -432,7 +431,7 @@ const de_AddTagsCommand = async (output, context) => {
432
431
  $metadata: deserializeMetadata(output),
433
432
  ...contents,
434
433
  };
435
- return Promise.resolve(response);
434
+ return response;
436
435
  };
437
436
  exports.de_AddTagsCommand = de_AddTagsCommand;
438
437
  const de_AddTagsCommandError = async (output, context) => {
@@ -462,10 +461,9 @@ const de_AddTagsCommandError = async (output, context) => {
462
461
  throw await de_TooManyTagsExceptionRes(parsedOutput, context);
463
462
  default:
464
463
  const parsedBody = parsedOutput.body;
465
- (0, smithy_client_1.throwDefaultError)({
464
+ return throwDefaultError({
466
465
  output,
467
466
  parsedBody: parsedBody.Error,
468
- exceptionCtor: ElasticLoadBalancingV2ServiceException_1.ElasticLoadBalancingV2ServiceException,
469
467
  errorCode,
470
468
  });
471
469
  }
@@ -481,7 +479,7 @@ const de_CreateListenerCommand = async (output, context) => {
481
479
  $metadata: deserializeMetadata(output),
482
480
  ...contents,
483
481
  };
484
- return Promise.resolve(response);
482
+ return response;
485
483
  };
486
484
  exports.de_CreateListenerCommand = de_CreateListenerCommand;
487
485
  const de_CreateListenerCommandError = async (output, context) => {
@@ -547,10 +545,9 @@ const de_CreateListenerCommandError = async (output, context) => {
547
545
  throw await de_UnsupportedProtocolExceptionRes(parsedOutput, context);
548
546
  default:
549
547
  const parsedBody = parsedOutput.body;
550
- (0, smithy_client_1.throwDefaultError)({
548
+ return throwDefaultError({
551
549
  output,
552
550
  parsedBody: parsedBody.Error,
553
- exceptionCtor: ElasticLoadBalancingV2ServiceException_1.ElasticLoadBalancingV2ServiceException,
554
551
  errorCode,
555
552
  });
556
553
  }
@@ -566,7 +563,7 @@ const de_CreateLoadBalancerCommand = async (output, context) => {
566
563
  $metadata: deserializeMetadata(output),
567
564
  ...contents,
568
565
  };
569
- return Promise.resolve(response);
566
+ return response;
570
567
  };
571
568
  exports.de_CreateLoadBalancerCommand = de_CreateLoadBalancerCommand;
572
569
  const de_CreateLoadBalancerCommandError = async (output, context) => {
@@ -617,10 +614,9 @@ const de_CreateLoadBalancerCommandError = async (output, context) => {
617
614
  throw await de_TooManyTagsExceptionRes(parsedOutput, context);
618
615
  default:
619
616
  const parsedBody = parsedOutput.body;
620
- (0, smithy_client_1.throwDefaultError)({
617
+ return throwDefaultError({
621
618
  output,
622
619
  parsedBody: parsedBody.Error,
623
- exceptionCtor: ElasticLoadBalancingV2ServiceException_1.ElasticLoadBalancingV2ServiceException,
624
620
  errorCode,
625
621
  });
626
622
  }
@@ -636,7 +632,7 @@ const de_CreateRuleCommand = async (output, context) => {
636
632
  $metadata: deserializeMetadata(output),
637
633
  ...contents,
638
634
  };
639
- return Promise.resolve(response);
635
+ return response;
640
636
  };
641
637
  exports.de_CreateRuleCommand = de_CreateRuleCommand;
642
638
  const de_CreateRuleCommandError = async (output, context) => {
@@ -693,10 +689,9 @@ const de_CreateRuleCommandError = async (output, context) => {
693
689
  throw await de_UnsupportedProtocolExceptionRes(parsedOutput, context);
694
690
  default:
695
691
  const parsedBody = parsedOutput.body;
696
- (0, smithy_client_1.throwDefaultError)({
692
+ return throwDefaultError({
697
693
  output,
698
694
  parsedBody: parsedBody.Error,
699
- exceptionCtor: ElasticLoadBalancingV2ServiceException_1.ElasticLoadBalancingV2ServiceException,
700
695
  errorCode,
701
696
  });
702
697
  }
@@ -712,7 +707,7 @@ const de_CreateTargetGroupCommand = async (output, context) => {
712
707
  $metadata: deserializeMetadata(output),
713
708
  ...contents,
714
709
  };
715
- return Promise.resolve(response);
710
+ return response;
716
711
  };
717
712
  exports.de_CreateTargetGroupCommand = de_CreateTargetGroupCommand;
718
713
  const de_CreateTargetGroupCommandError = async (output, context) => {
@@ -736,10 +731,9 @@ const de_CreateTargetGroupCommandError = async (output, context) => {
736
731
  throw await de_TooManyTargetGroupsExceptionRes(parsedOutput, context);
737
732
  default:
738
733
  const parsedBody = parsedOutput.body;
739
- (0, smithy_client_1.throwDefaultError)({
734
+ return throwDefaultError({
740
735
  output,
741
736
  parsedBody: parsedBody.Error,
742
- exceptionCtor: ElasticLoadBalancingV2ServiceException_1.ElasticLoadBalancingV2ServiceException,
743
737
  errorCode,
744
738
  });
745
739
  }
@@ -755,7 +749,7 @@ const de_DeleteListenerCommand = async (output, context) => {
755
749
  $metadata: deserializeMetadata(output),
756
750
  ...contents,
757
751
  };
758
- return Promise.resolve(response);
752
+ return response;
759
753
  };
760
754
  exports.de_DeleteListenerCommand = de_DeleteListenerCommand;
761
755
  const de_DeleteListenerCommandError = async (output, context) => {
@@ -773,10 +767,9 @@ const de_DeleteListenerCommandError = async (output, context) => {
773
767
  throw await de_ResourceInUseExceptionRes(parsedOutput, context);
774
768
  default:
775
769
  const parsedBody = parsedOutput.body;
776
- (0, smithy_client_1.throwDefaultError)({
770
+ return throwDefaultError({
777
771
  output,
778
772
  parsedBody: parsedBody.Error,
779
- exceptionCtor: ElasticLoadBalancingV2ServiceException_1.ElasticLoadBalancingV2ServiceException,
780
773
  errorCode,
781
774
  });
782
775
  }
@@ -792,7 +785,7 @@ const de_DeleteLoadBalancerCommand = async (output, context) => {
792
785
  $metadata: deserializeMetadata(output),
793
786
  ...contents,
794
787
  };
795
- return Promise.resolve(response);
788
+ return response;
796
789
  };
797
790
  exports.de_DeleteLoadBalancerCommand = de_DeleteLoadBalancerCommand;
798
791
  const de_DeleteLoadBalancerCommandError = async (output, context) => {
@@ -813,10 +806,9 @@ const de_DeleteLoadBalancerCommandError = async (output, context) => {
813
806
  throw await de_ResourceInUseExceptionRes(parsedOutput, context);
814
807
  default:
815
808
  const parsedBody = parsedOutput.body;
816
- (0, smithy_client_1.throwDefaultError)({
809
+ return throwDefaultError({
817
810
  output,
818
811
  parsedBody: parsedBody.Error,
819
- exceptionCtor: ElasticLoadBalancingV2ServiceException_1.ElasticLoadBalancingV2ServiceException,
820
812
  errorCode,
821
813
  });
822
814
  }
@@ -832,7 +824,7 @@ const de_DeleteRuleCommand = async (output, context) => {
832
824
  $metadata: deserializeMetadata(output),
833
825
  ...contents,
834
826
  };
835
- return Promise.resolve(response);
827
+ return response;
836
828
  };
837
829
  exports.de_DeleteRuleCommand = de_DeleteRuleCommand;
838
830
  const de_DeleteRuleCommandError = async (output, context) => {
@@ -850,10 +842,9 @@ const de_DeleteRuleCommandError = async (output, context) => {
850
842
  throw await de_RuleNotFoundExceptionRes(parsedOutput, context);
851
843
  default:
852
844
  const parsedBody = parsedOutput.body;
853
- (0, smithy_client_1.throwDefaultError)({
845
+ return throwDefaultError({
854
846
  output,
855
847
  parsedBody: parsedBody.Error,
856
- exceptionCtor: ElasticLoadBalancingV2ServiceException_1.ElasticLoadBalancingV2ServiceException,
857
848
  errorCode,
858
849
  });
859
850
  }
@@ -869,7 +860,7 @@ const de_DeleteTargetGroupCommand = async (output, context) => {
869
860
  $metadata: deserializeMetadata(output),
870
861
  ...contents,
871
862
  };
872
- return Promise.resolve(response);
863
+ return response;
873
864
  };
874
865
  exports.de_DeleteTargetGroupCommand = de_DeleteTargetGroupCommand;
875
866
  const de_DeleteTargetGroupCommandError = async (output, context) => {
@@ -884,10 +875,9 @@ const de_DeleteTargetGroupCommandError = async (output, context) => {
884
875
  throw await de_ResourceInUseExceptionRes(parsedOutput, context);
885
876
  default:
886
877
  const parsedBody = parsedOutput.body;
887
- (0, smithy_client_1.throwDefaultError)({
878
+ return throwDefaultError({
888
879
  output,
889
880
  parsedBody: parsedBody.Error,
890
- exceptionCtor: ElasticLoadBalancingV2ServiceException_1.ElasticLoadBalancingV2ServiceException,
891
881
  errorCode,
892
882
  });
893
883
  }
@@ -903,7 +893,7 @@ const de_DeregisterTargetsCommand = async (output, context) => {
903
893
  $metadata: deserializeMetadata(output),
904
894
  ...contents,
905
895
  };
906
- return Promise.resolve(response);
896
+ return response;
907
897
  };
908
898
  exports.de_DeregisterTargetsCommand = de_DeregisterTargetsCommand;
909
899
  const de_DeregisterTargetsCommandError = async (output, context) => {
@@ -921,10 +911,9 @@ const de_DeregisterTargetsCommandError = async (output, context) => {
921
911
  throw await de_TargetGroupNotFoundExceptionRes(parsedOutput, context);
922
912
  default:
923
913
  const parsedBody = parsedOutput.body;
924
- (0, smithy_client_1.throwDefaultError)({
914
+ return throwDefaultError({
925
915
  output,
926
916
  parsedBody: parsedBody.Error,
927
- exceptionCtor: ElasticLoadBalancingV2ServiceException_1.ElasticLoadBalancingV2ServiceException,
928
917
  errorCode,
929
918
  });
930
919
  }
@@ -940,7 +929,7 @@ const de_DescribeAccountLimitsCommand = async (output, context) => {
940
929
  $metadata: deserializeMetadata(output),
941
930
  ...contents,
942
931
  };
943
- return Promise.resolve(response);
932
+ return response;
944
933
  };
945
934
  exports.de_DescribeAccountLimitsCommand = de_DescribeAccountLimitsCommand;
946
935
  const de_DescribeAccountLimitsCommandError = async (output, context) => {
@@ -950,10 +939,9 @@ const de_DescribeAccountLimitsCommandError = async (output, context) => {
950
939
  };
951
940
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
952
941
  const parsedBody = parsedOutput.body;
953
- (0, smithy_client_1.throwDefaultError)({
942
+ return throwDefaultError({
954
943
  output,
955
944
  parsedBody: parsedBody.Error,
956
- exceptionCtor: ElasticLoadBalancingV2ServiceException_1.ElasticLoadBalancingV2ServiceException,
957
945
  errorCode,
958
946
  });
959
947
  };
@@ -968,7 +956,7 @@ const de_DescribeListenerCertificatesCommand = async (output, context) => {
968
956
  $metadata: deserializeMetadata(output),
969
957
  ...contents,
970
958
  };
971
- return Promise.resolve(response);
959
+ return response;
972
960
  };
973
961
  exports.de_DescribeListenerCertificatesCommand = de_DescribeListenerCertificatesCommand;
974
962
  const de_DescribeListenerCertificatesCommandError = async (output, context) => {
@@ -983,10 +971,9 @@ const de_DescribeListenerCertificatesCommandError = async (output, context) => {
983
971
  throw await de_ListenerNotFoundExceptionRes(parsedOutput, context);
984
972
  default:
985
973
  const parsedBody = parsedOutput.body;
986
- (0, smithy_client_1.throwDefaultError)({
974
+ return throwDefaultError({
987
975
  output,
988
976
  parsedBody: parsedBody.Error,
989
- exceptionCtor: ElasticLoadBalancingV2ServiceException_1.ElasticLoadBalancingV2ServiceException,
990
977
  errorCode,
991
978
  });
992
979
  }
@@ -1002,7 +989,7 @@ const de_DescribeListenersCommand = async (output, context) => {
1002
989
  $metadata: deserializeMetadata(output),
1003
990
  ...contents,
1004
991
  };
1005
- return Promise.resolve(response);
992
+ return response;
1006
993
  };
1007
994
  exports.de_DescribeListenersCommand = de_DescribeListenersCommand;
1008
995
  const de_DescribeListenersCommandError = async (output, context) => {
@@ -1023,10 +1010,9 @@ const de_DescribeListenersCommandError = async (output, context) => {
1023
1010
  throw await de_UnsupportedProtocolExceptionRes(parsedOutput, context);
1024
1011
  default:
1025
1012
  const parsedBody = parsedOutput.body;
1026
- (0, smithy_client_1.throwDefaultError)({
1013
+ return throwDefaultError({
1027
1014
  output,
1028
1015
  parsedBody: parsedBody.Error,
1029
- exceptionCtor: ElasticLoadBalancingV2ServiceException_1.ElasticLoadBalancingV2ServiceException,
1030
1016
  errorCode,
1031
1017
  });
1032
1018
  }
@@ -1042,7 +1028,7 @@ const de_DescribeLoadBalancerAttributesCommand = async (output, context) => {
1042
1028
  $metadata: deserializeMetadata(output),
1043
1029
  ...contents,
1044
1030
  };
1045
- return Promise.resolve(response);
1031
+ return response;
1046
1032
  };
1047
1033
  exports.de_DescribeLoadBalancerAttributesCommand = de_DescribeLoadBalancerAttributesCommand;
1048
1034
  const de_DescribeLoadBalancerAttributesCommandError = async (output, context) => {
@@ -1057,10 +1043,9 @@ const de_DescribeLoadBalancerAttributesCommandError = async (output, context) =>
1057
1043
  throw await de_LoadBalancerNotFoundExceptionRes(parsedOutput, context);
1058
1044
  default:
1059
1045
  const parsedBody = parsedOutput.body;
1060
- (0, smithy_client_1.throwDefaultError)({
1046
+ return throwDefaultError({
1061
1047
  output,
1062
1048
  parsedBody: parsedBody.Error,
1063
- exceptionCtor: ElasticLoadBalancingV2ServiceException_1.ElasticLoadBalancingV2ServiceException,
1064
1049
  errorCode,
1065
1050
  });
1066
1051
  }
@@ -1076,7 +1061,7 @@ const de_DescribeLoadBalancersCommand = async (output, context) => {
1076
1061
  $metadata: deserializeMetadata(output),
1077
1062
  ...contents,
1078
1063
  };
1079
- return Promise.resolve(response);
1064
+ return response;
1080
1065
  };
1081
1066
  exports.de_DescribeLoadBalancersCommand = de_DescribeLoadBalancersCommand;
1082
1067
  const de_DescribeLoadBalancersCommandError = async (output, context) => {
@@ -1091,10 +1076,9 @@ const de_DescribeLoadBalancersCommandError = async (output, context) => {
1091
1076
  throw await de_LoadBalancerNotFoundExceptionRes(parsedOutput, context);
1092
1077
  default:
1093
1078
  const parsedBody = parsedOutput.body;
1094
- (0, smithy_client_1.throwDefaultError)({
1079
+ return throwDefaultError({
1095
1080
  output,
1096
1081
  parsedBody: parsedBody.Error,
1097
- exceptionCtor: ElasticLoadBalancingV2ServiceException_1.ElasticLoadBalancingV2ServiceException,
1098
1082
  errorCode,
1099
1083
  });
1100
1084
  }
@@ -1110,7 +1094,7 @@ const de_DescribeRulesCommand = async (output, context) => {
1110
1094
  $metadata: deserializeMetadata(output),
1111
1095
  ...contents,
1112
1096
  };
1113
- return Promise.resolve(response);
1097
+ return response;
1114
1098
  };
1115
1099
  exports.de_DescribeRulesCommand = de_DescribeRulesCommand;
1116
1100
  const de_DescribeRulesCommandError = async (output, context) => {
@@ -1131,10 +1115,9 @@ const de_DescribeRulesCommandError = async (output, context) => {
1131
1115
  throw await de_UnsupportedProtocolExceptionRes(parsedOutput, context);
1132
1116
  default:
1133
1117
  const parsedBody = parsedOutput.body;
1134
- (0, smithy_client_1.throwDefaultError)({
1118
+ return throwDefaultError({
1135
1119
  output,
1136
1120
  parsedBody: parsedBody.Error,
1137
- exceptionCtor: ElasticLoadBalancingV2ServiceException_1.ElasticLoadBalancingV2ServiceException,
1138
1121
  errorCode,
1139
1122
  });
1140
1123
  }
@@ -1150,7 +1133,7 @@ const de_DescribeSSLPoliciesCommand = async (output, context) => {
1150
1133
  $metadata: deserializeMetadata(output),
1151
1134
  ...contents,
1152
1135
  };
1153
- return Promise.resolve(response);
1136
+ return response;
1154
1137
  };
1155
1138
  exports.de_DescribeSSLPoliciesCommand = de_DescribeSSLPoliciesCommand;
1156
1139
  const de_DescribeSSLPoliciesCommandError = async (output, context) => {
@@ -1165,10 +1148,9 @@ const de_DescribeSSLPoliciesCommandError = async (output, context) => {
1165
1148
  throw await de_SSLPolicyNotFoundExceptionRes(parsedOutput, context);
1166
1149
  default:
1167
1150
  const parsedBody = parsedOutput.body;
1168
- (0, smithy_client_1.throwDefaultError)({
1151
+ return throwDefaultError({
1169
1152
  output,
1170
1153
  parsedBody: parsedBody.Error,
1171
- exceptionCtor: ElasticLoadBalancingV2ServiceException_1.ElasticLoadBalancingV2ServiceException,
1172
1154
  errorCode,
1173
1155
  });
1174
1156
  }
@@ -1184,7 +1166,7 @@ const de_DescribeTagsCommand = async (output, context) => {
1184
1166
  $metadata: deserializeMetadata(output),
1185
1167
  ...contents,
1186
1168
  };
1187
- return Promise.resolve(response);
1169
+ return response;
1188
1170
  };
1189
1171
  exports.de_DescribeTagsCommand = de_DescribeTagsCommand;
1190
1172
  const de_DescribeTagsCommandError = async (output, context) => {
@@ -1208,10 +1190,9 @@ const de_DescribeTagsCommandError = async (output, context) => {
1208
1190
  throw await de_TargetGroupNotFoundExceptionRes(parsedOutput, context);
1209
1191
  default:
1210
1192
  const parsedBody = parsedOutput.body;
1211
- (0, smithy_client_1.throwDefaultError)({
1193
+ return throwDefaultError({
1212
1194
  output,
1213
1195
  parsedBody: parsedBody.Error,
1214
- exceptionCtor: ElasticLoadBalancingV2ServiceException_1.ElasticLoadBalancingV2ServiceException,
1215
1196
  errorCode,
1216
1197
  });
1217
1198
  }
@@ -1227,7 +1208,7 @@ const de_DescribeTargetGroupAttributesCommand = async (output, context) => {
1227
1208
  $metadata: deserializeMetadata(output),
1228
1209
  ...contents,
1229
1210
  };
1230
- return Promise.resolve(response);
1211
+ return response;
1231
1212
  };
1232
1213
  exports.de_DescribeTargetGroupAttributesCommand = de_DescribeTargetGroupAttributesCommand;
1233
1214
  const de_DescribeTargetGroupAttributesCommandError = async (output, context) => {
@@ -1242,10 +1223,9 @@ const de_DescribeTargetGroupAttributesCommandError = async (output, context) =>
1242
1223
  throw await de_TargetGroupNotFoundExceptionRes(parsedOutput, context);
1243
1224
  default:
1244
1225
  const parsedBody = parsedOutput.body;
1245
- (0, smithy_client_1.throwDefaultError)({
1226
+ return throwDefaultError({
1246
1227
  output,
1247
1228
  parsedBody: parsedBody.Error,
1248
- exceptionCtor: ElasticLoadBalancingV2ServiceException_1.ElasticLoadBalancingV2ServiceException,
1249
1229
  errorCode,
1250
1230
  });
1251
1231
  }
@@ -1261,7 +1241,7 @@ const de_DescribeTargetGroupsCommand = async (output, context) => {
1261
1241
  $metadata: deserializeMetadata(output),
1262
1242
  ...contents,
1263
1243
  };
1264
- return Promise.resolve(response);
1244
+ return response;
1265
1245
  };
1266
1246
  exports.de_DescribeTargetGroupsCommand = de_DescribeTargetGroupsCommand;
1267
1247
  const de_DescribeTargetGroupsCommandError = async (output, context) => {
@@ -1279,10 +1259,9 @@ const de_DescribeTargetGroupsCommandError = async (output, context) => {
1279
1259
  throw await de_TargetGroupNotFoundExceptionRes(parsedOutput, context);
1280
1260
  default:
1281
1261
  const parsedBody = parsedOutput.body;
1282
- (0, smithy_client_1.throwDefaultError)({
1262
+ return throwDefaultError({
1283
1263
  output,
1284
1264
  parsedBody: parsedBody.Error,
1285
- exceptionCtor: ElasticLoadBalancingV2ServiceException_1.ElasticLoadBalancingV2ServiceException,
1286
1265
  errorCode,
1287
1266
  });
1288
1267
  }
@@ -1298,7 +1277,7 @@ const de_DescribeTargetHealthCommand = async (output, context) => {
1298
1277
  $metadata: deserializeMetadata(output),
1299
1278
  ...contents,
1300
1279
  };
1301
- return Promise.resolve(response);
1280
+ return response;
1302
1281
  };
1303
1282
  exports.de_DescribeTargetHealthCommand = de_DescribeTargetHealthCommand;
1304
1283
  const de_DescribeTargetHealthCommandError = async (output, context) => {
@@ -1319,10 +1298,9 @@ const de_DescribeTargetHealthCommandError = async (output, context) => {
1319
1298
  throw await de_TargetGroupNotFoundExceptionRes(parsedOutput, context);
1320
1299
  default:
1321
1300
  const parsedBody = parsedOutput.body;
1322
- (0, smithy_client_1.throwDefaultError)({
1301
+ return throwDefaultError({
1323
1302
  output,
1324
1303
  parsedBody: parsedBody.Error,
1325
- exceptionCtor: ElasticLoadBalancingV2ServiceException_1.ElasticLoadBalancingV2ServiceException,
1326
1304
  errorCode,
1327
1305
  });
1328
1306
  }
@@ -1338,7 +1316,7 @@ const de_ModifyListenerCommand = async (output, context) => {
1338
1316
  $metadata: deserializeMetadata(output),
1339
1317
  ...contents,
1340
1318
  };
1341
- return Promise.resolve(response);
1319
+ return response;
1342
1320
  };
1343
1321
  exports.de_ModifyListenerCommand = de_ModifyListenerCommand;
1344
1322
  const de_ModifyListenerCommandError = async (output, context) => {
@@ -1401,10 +1379,9 @@ const de_ModifyListenerCommandError = async (output, context) => {
1401
1379
  throw await de_UnsupportedProtocolExceptionRes(parsedOutput, context);
1402
1380
  default:
1403
1381
  const parsedBody = parsedOutput.body;
1404
- (0, smithy_client_1.throwDefaultError)({
1382
+ return throwDefaultError({
1405
1383
  output,
1406
1384
  parsedBody: parsedBody.Error,
1407
- exceptionCtor: ElasticLoadBalancingV2ServiceException_1.ElasticLoadBalancingV2ServiceException,
1408
1385
  errorCode,
1409
1386
  });
1410
1387
  }
@@ -1420,7 +1397,7 @@ const de_ModifyLoadBalancerAttributesCommand = async (output, context) => {
1420
1397
  $metadata: deserializeMetadata(output),
1421
1398
  ...contents,
1422
1399
  };
1423
- return Promise.resolve(response);
1400
+ return response;
1424
1401
  };
1425
1402
  exports.de_ModifyLoadBalancerAttributesCommand = de_ModifyLoadBalancerAttributesCommand;
1426
1403
  const de_ModifyLoadBalancerAttributesCommandError = async (output, context) => {
@@ -1438,10 +1415,9 @@ const de_ModifyLoadBalancerAttributesCommandError = async (output, context) => {
1438
1415
  throw await de_LoadBalancerNotFoundExceptionRes(parsedOutput, context);
1439
1416
  default:
1440
1417
  const parsedBody = parsedOutput.body;
1441
- (0, smithy_client_1.throwDefaultError)({
1418
+ return throwDefaultError({
1442
1419
  output,
1443
1420
  parsedBody: parsedBody.Error,
1444
- exceptionCtor: ElasticLoadBalancingV2ServiceException_1.ElasticLoadBalancingV2ServiceException,
1445
1421
  errorCode,
1446
1422
  });
1447
1423
  }
@@ -1457,7 +1433,7 @@ const de_ModifyRuleCommand = async (output, context) => {
1457
1433
  $metadata: deserializeMetadata(output),
1458
1434
  ...contents,
1459
1435
  };
1460
- return Promise.resolve(response);
1436
+ return response;
1461
1437
  };
1462
1438
  exports.de_ModifyRuleCommand = de_ModifyRuleCommand;
1463
1439
  const de_ModifyRuleCommandError = async (output, context) => {
@@ -1502,10 +1478,9 @@ const de_ModifyRuleCommandError = async (output, context) => {
1502
1478
  throw await de_UnsupportedProtocolExceptionRes(parsedOutput, context);
1503
1479
  default:
1504
1480
  const parsedBody = parsedOutput.body;
1505
- (0, smithy_client_1.throwDefaultError)({
1481
+ return throwDefaultError({
1506
1482
  output,
1507
1483
  parsedBody: parsedBody.Error,
1508
- exceptionCtor: ElasticLoadBalancingV2ServiceException_1.ElasticLoadBalancingV2ServiceException,
1509
1484
  errorCode,
1510
1485
  });
1511
1486
  }
@@ -1521,7 +1496,7 @@ const de_ModifyTargetGroupCommand = async (output, context) => {
1521
1496
  $metadata: deserializeMetadata(output),
1522
1497
  ...contents,
1523
1498
  };
1524
- return Promise.resolve(response);
1499
+ return response;
1525
1500
  };
1526
1501
  exports.de_ModifyTargetGroupCommand = de_ModifyTargetGroupCommand;
1527
1502
  const de_ModifyTargetGroupCommandError = async (output, context) => {
@@ -1539,10 +1514,9 @@ const de_ModifyTargetGroupCommandError = async (output, context) => {
1539
1514
  throw await de_TargetGroupNotFoundExceptionRes(parsedOutput, context);
1540
1515
  default:
1541
1516
  const parsedBody = parsedOutput.body;
1542
- (0, smithy_client_1.throwDefaultError)({
1517
+ return throwDefaultError({
1543
1518
  output,
1544
1519
  parsedBody: parsedBody.Error,
1545
- exceptionCtor: ElasticLoadBalancingV2ServiceException_1.ElasticLoadBalancingV2ServiceException,
1546
1520
  errorCode,
1547
1521
  });
1548
1522
  }
@@ -1558,7 +1532,7 @@ const de_ModifyTargetGroupAttributesCommand = async (output, context) => {
1558
1532
  $metadata: deserializeMetadata(output),
1559
1533
  ...contents,
1560
1534
  };
1561
- return Promise.resolve(response);
1535
+ return response;
1562
1536
  };
1563
1537
  exports.de_ModifyTargetGroupAttributesCommand = de_ModifyTargetGroupAttributesCommand;
1564
1538
  const de_ModifyTargetGroupAttributesCommandError = async (output, context) => {
@@ -1576,10 +1550,9 @@ const de_ModifyTargetGroupAttributesCommandError = async (output, context) => {
1576
1550
  throw await de_TargetGroupNotFoundExceptionRes(parsedOutput, context);
1577
1551
  default:
1578
1552
  const parsedBody = parsedOutput.body;
1579
- (0, smithy_client_1.throwDefaultError)({
1553
+ return throwDefaultError({
1580
1554
  output,
1581
1555
  parsedBody: parsedBody.Error,
1582
- exceptionCtor: ElasticLoadBalancingV2ServiceException_1.ElasticLoadBalancingV2ServiceException,
1583
1556
  errorCode,
1584
1557
  });
1585
1558
  }
@@ -1595,7 +1568,7 @@ const de_RegisterTargetsCommand = async (output, context) => {
1595
1568
  $metadata: deserializeMetadata(output),
1596
1569
  ...contents,
1597
1570
  };
1598
- return Promise.resolve(response);
1571
+ return response;
1599
1572
  };
1600
1573
  exports.de_RegisterTargetsCommand = de_RegisterTargetsCommand;
1601
1574
  const de_RegisterTargetsCommandError = async (output, context) => {
@@ -1619,10 +1592,9 @@ const de_RegisterTargetsCommandError = async (output, context) => {
1619
1592
  throw await de_TooManyTargetsExceptionRes(parsedOutput, context);
1620
1593
  default:
1621
1594
  const parsedBody = parsedOutput.body;
1622
- (0, smithy_client_1.throwDefaultError)({
1595
+ return throwDefaultError({
1623
1596
  output,
1624
1597
  parsedBody: parsedBody.Error,
1625
- exceptionCtor: ElasticLoadBalancingV2ServiceException_1.ElasticLoadBalancingV2ServiceException,
1626
1598
  errorCode,
1627
1599
  });
1628
1600
  }
@@ -1638,7 +1610,7 @@ const de_RemoveListenerCertificatesCommand = async (output, context) => {
1638
1610
  $metadata: deserializeMetadata(output),
1639
1611
  ...contents,
1640
1612
  };
1641
- return Promise.resolve(response);
1613
+ return response;
1642
1614
  };
1643
1615
  exports.de_RemoveListenerCertificatesCommand = de_RemoveListenerCertificatesCommand;
1644
1616
  const de_RemoveListenerCertificatesCommandError = async (output, context) => {
@@ -1656,10 +1628,9 @@ const de_RemoveListenerCertificatesCommandError = async (output, context) => {
1656
1628
  throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
1657
1629
  default:
1658
1630
  const parsedBody = parsedOutput.body;
1659
- (0, smithy_client_1.throwDefaultError)({
1631
+ return throwDefaultError({
1660
1632
  output,
1661
1633
  parsedBody: parsedBody.Error,
1662
- exceptionCtor: ElasticLoadBalancingV2ServiceException_1.ElasticLoadBalancingV2ServiceException,
1663
1634
  errorCode,
1664
1635
  });
1665
1636
  }
@@ -1675,7 +1646,7 @@ const de_RemoveTagsCommand = async (output, context) => {
1675
1646
  $metadata: deserializeMetadata(output),
1676
1647
  ...contents,
1677
1648
  };
1678
- return Promise.resolve(response);
1649
+ return response;
1679
1650
  };
1680
1651
  exports.de_RemoveTagsCommand = de_RemoveTagsCommand;
1681
1652
  const de_RemoveTagsCommandError = async (output, context) => {
@@ -1702,10 +1673,9 @@ const de_RemoveTagsCommandError = async (output, context) => {
1702
1673
  throw await de_TooManyTagsExceptionRes(parsedOutput, context);
1703
1674
  default:
1704
1675
  const parsedBody = parsedOutput.body;
1705
- (0, smithy_client_1.throwDefaultError)({
1676
+ return throwDefaultError({
1706
1677
  output,
1707
1678
  parsedBody: parsedBody.Error,
1708
- exceptionCtor: ElasticLoadBalancingV2ServiceException_1.ElasticLoadBalancingV2ServiceException,
1709
1679
  errorCode,
1710
1680
  });
1711
1681
  }
@@ -1721,7 +1691,7 @@ const de_SetIpAddressTypeCommand = async (output, context) => {
1721
1691
  $metadata: deserializeMetadata(output),
1722
1692
  ...contents,
1723
1693
  };
1724
- return Promise.resolve(response);
1694
+ return response;
1725
1695
  };
1726
1696
  exports.de_SetIpAddressTypeCommand = de_SetIpAddressTypeCommand;
1727
1697
  const de_SetIpAddressTypeCommandError = async (output, context) => {
@@ -1742,10 +1712,9 @@ const de_SetIpAddressTypeCommandError = async (output, context) => {
1742
1712
  throw await de_LoadBalancerNotFoundExceptionRes(parsedOutput, context);
1743
1713
  default:
1744
1714
  const parsedBody = parsedOutput.body;
1745
- (0, smithy_client_1.throwDefaultError)({
1715
+ return throwDefaultError({
1746
1716
  output,
1747
1717
  parsedBody: parsedBody.Error,
1748
- exceptionCtor: ElasticLoadBalancingV2ServiceException_1.ElasticLoadBalancingV2ServiceException,
1749
1718
  errorCode,
1750
1719
  });
1751
1720
  }
@@ -1761,7 +1730,7 @@ const de_SetRulePrioritiesCommand = async (output, context) => {
1761
1730
  $metadata: deserializeMetadata(output),
1762
1731
  ...contents,
1763
1732
  };
1764
- return Promise.resolve(response);
1733
+ return response;
1765
1734
  };
1766
1735
  exports.de_SetRulePrioritiesCommand = de_SetRulePrioritiesCommand;
1767
1736
  const de_SetRulePrioritiesCommandError = async (output, context) => {
@@ -1782,10 +1751,9 @@ const de_SetRulePrioritiesCommandError = async (output, context) => {
1782
1751
  throw await de_RuleNotFoundExceptionRes(parsedOutput, context);
1783
1752
  default:
1784
1753
  const parsedBody = parsedOutput.body;
1785
- (0, smithy_client_1.throwDefaultError)({
1754
+ return throwDefaultError({
1786
1755
  output,
1787
1756
  parsedBody: parsedBody.Error,
1788
- exceptionCtor: ElasticLoadBalancingV2ServiceException_1.ElasticLoadBalancingV2ServiceException,
1789
1757
  errorCode,
1790
1758
  });
1791
1759
  }
@@ -1801,7 +1769,7 @@ const de_SetSecurityGroupsCommand = async (output, context) => {
1801
1769
  $metadata: deserializeMetadata(output),
1802
1770
  ...contents,
1803
1771
  };
1804
- return Promise.resolve(response);
1772
+ return response;
1805
1773
  };
1806
1774
  exports.de_SetSecurityGroupsCommand = de_SetSecurityGroupsCommand;
1807
1775
  const de_SetSecurityGroupsCommandError = async (output, context) => {
@@ -1822,10 +1790,9 @@ const de_SetSecurityGroupsCommandError = async (output, context) => {
1822
1790
  throw await de_LoadBalancerNotFoundExceptionRes(parsedOutput, context);
1823
1791
  default:
1824
1792
  const parsedBody = parsedOutput.body;
1825
- (0, smithy_client_1.throwDefaultError)({
1793
+ return throwDefaultError({
1826
1794
  output,
1827
1795
  parsedBody: parsedBody.Error,
1828
- exceptionCtor: ElasticLoadBalancingV2ServiceException_1.ElasticLoadBalancingV2ServiceException,
1829
1796
  errorCode,
1830
1797
  });
1831
1798
  }
@@ -1841,7 +1808,7 @@ const de_SetSubnetsCommand = async (output, context) => {
1841
1808
  $metadata: deserializeMetadata(output),
1842
1809
  ...contents,
1843
1810
  };
1844
- return Promise.resolve(response);
1811
+ return response;
1845
1812
  };
1846
1813
  exports.de_SetSubnetsCommand = de_SetSubnetsCommand;
1847
1814
  const de_SetSubnetsCommandError = async (output, context) => {
@@ -1871,10 +1838,9 @@ const de_SetSubnetsCommandError = async (output, context) => {
1871
1838
  throw await de_SubnetNotFoundExceptionRes(parsedOutput, context);
1872
1839
  default:
1873
1840
  const parsedBody = parsedOutput.body;
1874
- (0, smithy_client_1.throwDefaultError)({
1841
+ return throwDefaultError({
1875
1842
  output,
1876
1843
  parsedBody: parsedBody.Error,
1877
- exceptionCtor: ElasticLoadBalancingV2ServiceException_1.ElasticLoadBalancingV2ServiceException,
1878
1844
  errorCode,
1879
1845
  });
1880
1846
  }
@@ -5190,6 +5156,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
5190
5156
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
5191
5157
  };
5192
5158
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
5159
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(ElasticLoadBalancingV2ServiceException_1.ElasticLoadBalancingV2ServiceException);
5193
5160
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
5194
5161
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
5195
5162
  const contents = {