@aws-sdk/client-codeguru-security 3.503.1 → 3.507.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist-cjs/index.js CHANGED
@@ -541,7 +541,7 @@ var se_UpdateAccountConfigurationCommand = /* @__PURE__ */ __name(async (input,
541
541
  }, "se_UpdateAccountConfigurationCommand");
542
542
  var de_BatchGetFindingsCommand = /* @__PURE__ */ __name(async (output, context) => {
543
543
  if (output.statusCode !== 200 && output.statusCode >= 300) {
544
- return de_BatchGetFindingsCommandError(output, context);
544
+ return de_CommandError(output, context);
545
545
  }
546
546
  const contents = (0, import_smithy_client.map)({
547
547
  $metadata: deserializeMetadata(output)
@@ -554,37 +554,9 @@ var de_BatchGetFindingsCommand = /* @__PURE__ */ __name(async (output, context)
554
554
  Object.assign(contents, doc);
555
555
  return contents;
556
556
  }, "de_BatchGetFindingsCommand");
557
- var de_BatchGetFindingsCommandError = /* @__PURE__ */ __name(async (output, context) => {
558
- const parsedOutput = {
559
- ...output,
560
- body: await parseErrorBody(output.body, context)
561
- };
562
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
563
- switch (errorCode) {
564
- case "AccessDeniedException":
565
- case "com.amazonaws.codegurusecurity#AccessDeniedException":
566
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
567
- case "InternalServerException":
568
- case "com.amazonaws.codegurusecurity#InternalServerException":
569
- throw await de_InternalServerExceptionRes(parsedOutput, context);
570
- case "ThrottlingException":
571
- case "com.amazonaws.codegurusecurity#ThrottlingException":
572
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
573
- case "ValidationException":
574
- case "com.amazonaws.codegurusecurity#ValidationException":
575
- throw await de_ValidationExceptionRes(parsedOutput, context);
576
- default:
577
- const parsedBody = parsedOutput.body;
578
- return throwDefaultError({
579
- output,
580
- parsedBody,
581
- errorCode
582
- });
583
- }
584
- }, "de_BatchGetFindingsCommandError");
585
557
  var de_CreateScanCommand = /* @__PURE__ */ __name(async (output, context) => {
586
558
  if (output.statusCode !== 200 && output.statusCode >= 300) {
587
- return de_CreateScanCommandError(output, context);
559
+ return de_CommandError(output, context);
588
560
  }
589
561
  const contents = (0, import_smithy_client.map)({
590
562
  $metadata: deserializeMetadata(output)
@@ -600,43 +572,9 @@ var de_CreateScanCommand = /* @__PURE__ */ __name(async (output, context) => {
600
572
  Object.assign(contents, doc);
601
573
  return contents;
602
574
  }, "de_CreateScanCommand");
603
- var de_CreateScanCommandError = /* @__PURE__ */ __name(async (output, context) => {
604
- const parsedOutput = {
605
- ...output,
606
- body: await parseErrorBody(output.body, context)
607
- };
608
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
609
- switch (errorCode) {
610
- case "AccessDeniedException":
611
- case "com.amazonaws.codegurusecurity#AccessDeniedException":
612
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
613
- case "ConflictException":
614
- case "com.amazonaws.codegurusecurity#ConflictException":
615
- throw await de_ConflictExceptionRes(parsedOutput, context);
616
- case "InternalServerException":
617
- case "com.amazonaws.codegurusecurity#InternalServerException":
618
- throw await de_InternalServerExceptionRes(parsedOutput, context);
619
- case "ResourceNotFoundException":
620
- case "com.amazonaws.codegurusecurity#ResourceNotFoundException":
621
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
622
- case "ThrottlingException":
623
- case "com.amazonaws.codegurusecurity#ThrottlingException":
624
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
625
- case "ValidationException":
626
- case "com.amazonaws.codegurusecurity#ValidationException":
627
- throw await de_ValidationExceptionRes(parsedOutput, context);
628
- default:
629
- const parsedBody = parsedOutput.body;
630
- return throwDefaultError({
631
- output,
632
- parsedBody,
633
- errorCode
634
- });
635
- }
636
- }, "de_CreateScanCommandError");
637
575
  var de_CreateUploadUrlCommand = /* @__PURE__ */ __name(async (output, context) => {
638
576
  if (output.statusCode !== 200 && output.statusCode >= 300) {
639
- return de_CreateUploadUrlCommandError(output, context);
577
+ return de_CommandError(output, context);
640
578
  }
641
579
  const contents = (0, import_smithy_client.map)({
642
580
  $metadata: deserializeMetadata(output)
@@ -650,37 +588,9 @@ var de_CreateUploadUrlCommand = /* @__PURE__ */ __name(async (output, context) =
650
588
  Object.assign(contents, doc);
651
589
  return contents;
652
590
  }, "de_CreateUploadUrlCommand");
653
- var de_CreateUploadUrlCommandError = /* @__PURE__ */ __name(async (output, context) => {
654
- const parsedOutput = {
655
- ...output,
656
- body: await parseErrorBody(output.body, context)
657
- };
658
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
659
- switch (errorCode) {
660
- case "AccessDeniedException":
661
- case "com.amazonaws.codegurusecurity#AccessDeniedException":
662
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
663
- case "InternalServerException":
664
- case "com.amazonaws.codegurusecurity#InternalServerException":
665
- throw await de_InternalServerExceptionRes(parsedOutput, context);
666
- case "ThrottlingException":
667
- case "com.amazonaws.codegurusecurity#ThrottlingException":
668
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
669
- case "ValidationException":
670
- case "com.amazonaws.codegurusecurity#ValidationException":
671
- throw await de_ValidationExceptionRes(parsedOutput, context);
672
- default:
673
- const parsedBody = parsedOutput.body;
674
- return throwDefaultError({
675
- output,
676
- parsedBody,
677
- errorCode
678
- });
679
- }
680
- }, "de_CreateUploadUrlCommandError");
681
591
  var de_GetAccountConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => {
682
592
  if (output.statusCode !== 200 && output.statusCode >= 300) {
683
- return de_GetAccountConfigurationCommandError(output, context);
593
+ return de_CommandError(output, context);
684
594
  }
685
595
  const contents = (0, import_smithy_client.map)({
686
596
  $metadata: deserializeMetadata(output)
@@ -692,37 +602,9 @@ var de_GetAccountConfigurationCommand = /* @__PURE__ */ __name(async (output, co
692
602
  Object.assign(contents, doc);
693
603
  return contents;
694
604
  }, "de_GetAccountConfigurationCommand");
695
- var de_GetAccountConfigurationCommandError = /* @__PURE__ */ __name(async (output, context) => {
696
- const parsedOutput = {
697
- ...output,
698
- body: await parseErrorBody(output.body, context)
699
- };
700
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
701
- switch (errorCode) {
702
- case "AccessDeniedException":
703
- case "com.amazonaws.codegurusecurity#AccessDeniedException":
704
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
705
- case "InternalServerException":
706
- case "com.amazonaws.codegurusecurity#InternalServerException":
707
- throw await de_InternalServerExceptionRes(parsedOutput, context);
708
- case "ThrottlingException":
709
- case "com.amazonaws.codegurusecurity#ThrottlingException":
710
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
711
- case "ValidationException":
712
- case "com.amazonaws.codegurusecurity#ValidationException":
713
- throw await de_ValidationExceptionRes(parsedOutput, context);
714
- default:
715
- const parsedBody = parsedOutput.body;
716
- return throwDefaultError({
717
- output,
718
- parsedBody,
719
- errorCode
720
- });
721
- }
722
- }, "de_GetAccountConfigurationCommandError");
723
605
  var de_GetFindingsCommand = /* @__PURE__ */ __name(async (output, context) => {
724
606
  if (output.statusCode !== 200 && output.statusCode >= 300) {
725
- return de_GetFindingsCommandError(output, context);
607
+ return de_CommandError(output, context);
726
608
  }
727
609
  const contents = (0, import_smithy_client.map)({
728
610
  $metadata: deserializeMetadata(output)
@@ -735,43 +617,9 @@ var de_GetFindingsCommand = /* @__PURE__ */ __name(async (output, context) => {
735
617
  Object.assign(contents, doc);
736
618
  return contents;
737
619
  }, "de_GetFindingsCommand");
738
- var de_GetFindingsCommandError = /* @__PURE__ */ __name(async (output, context) => {
739
- const parsedOutput = {
740
- ...output,
741
- body: await parseErrorBody(output.body, context)
742
- };
743
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
744
- switch (errorCode) {
745
- case "AccessDeniedException":
746
- case "com.amazonaws.codegurusecurity#AccessDeniedException":
747
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
748
- case "ConflictException":
749
- case "com.amazonaws.codegurusecurity#ConflictException":
750
- throw await de_ConflictExceptionRes(parsedOutput, context);
751
- case "InternalServerException":
752
- case "com.amazonaws.codegurusecurity#InternalServerException":
753
- throw await de_InternalServerExceptionRes(parsedOutput, context);
754
- case "ResourceNotFoundException":
755
- case "com.amazonaws.codegurusecurity#ResourceNotFoundException":
756
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
757
- case "ThrottlingException":
758
- case "com.amazonaws.codegurusecurity#ThrottlingException":
759
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
760
- case "ValidationException":
761
- case "com.amazonaws.codegurusecurity#ValidationException":
762
- throw await de_ValidationExceptionRes(parsedOutput, context);
763
- default:
764
- const parsedBody = parsedOutput.body;
765
- return throwDefaultError({
766
- output,
767
- parsedBody,
768
- errorCode
769
- });
770
- }
771
- }, "de_GetFindingsCommandError");
772
620
  var de_GetMetricsSummaryCommand = /* @__PURE__ */ __name(async (output, context) => {
773
621
  if (output.statusCode !== 200 && output.statusCode >= 300) {
774
- return de_GetMetricsSummaryCommandError(output, context);
622
+ return de_CommandError(output, context);
775
623
  }
776
624
  const contents = (0, import_smithy_client.map)({
777
625
  $metadata: deserializeMetadata(output)
@@ -783,37 +631,9 @@ var de_GetMetricsSummaryCommand = /* @__PURE__ */ __name(async (output, context)
783
631
  Object.assign(contents, doc);
784
632
  return contents;
785
633
  }, "de_GetMetricsSummaryCommand");
786
- var de_GetMetricsSummaryCommandError = /* @__PURE__ */ __name(async (output, context) => {
787
- const parsedOutput = {
788
- ...output,
789
- body: await parseErrorBody(output.body, context)
790
- };
791
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
792
- switch (errorCode) {
793
- case "AccessDeniedException":
794
- case "com.amazonaws.codegurusecurity#AccessDeniedException":
795
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
796
- case "InternalServerException":
797
- case "com.amazonaws.codegurusecurity#InternalServerException":
798
- throw await de_InternalServerExceptionRes(parsedOutput, context);
799
- case "ThrottlingException":
800
- case "com.amazonaws.codegurusecurity#ThrottlingException":
801
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
802
- case "ValidationException":
803
- case "com.amazonaws.codegurusecurity#ValidationException":
804
- throw await de_ValidationExceptionRes(parsedOutput, context);
805
- default:
806
- const parsedBody = parsedOutput.body;
807
- return throwDefaultError({
808
- output,
809
- parsedBody,
810
- errorCode
811
- });
812
- }
813
- }, "de_GetMetricsSummaryCommandError");
814
634
  var de_GetScanCommand = /* @__PURE__ */ __name(async (output, context) => {
815
635
  if (output.statusCode !== 200 && output.statusCode >= 300) {
816
- return de_GetScanCommandError(output, context);
636
+ return de_CommandError(output, context);
817
637
  }
818
638
  const contents = (0, import_smithy_client.map)({
819
639
  $metadata: deserializeMetadata(output)
@@ -832,37 +652,9 @@ var de_GetScanCommand = /* @__PURE__ */ __name(async (output, context) => {
832
652
  Object.assign(contents, doc);
833
653
  return contents;
834
654
  }, "de_GetScanCommand");
835
- var de_GetScanCommandError = /* @__PURE__ */ __name(async (output, context) => {
836
- const parsedOutput = {
837
- ...output,
838
- body: await parseErrorBody(output.body, context)
839
- };
840
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
841
- switch (errorCode) {
842
- case "AccessDeniedException":
843
- case "com.amazonaws.codegurusecurity#AccessDeniedException":
844
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
845
- case "InternalServerException":
846
- case "com.amazonaws.codegurusecurity#InternalServerException":
847
- throw await de_InternalServerExceptionRes(parsedOutput, context);
848
- case "ResourceNotFoundException":
849
- case "com.amazonaws.codegurusecurity#ResourceNotFoundException":
850
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
851
- case "ThrottlingException":
852
- case "com.amazonaws.codegurusecurity#ThrottlingException":
853
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
854
- default:
855
- const parsedBody = parsedOutput.body;
856
- return throwDefaultError({
857
- output,
858
- parsedBody,
859
- errorCode
860
- });
861
- }
862
- }, "de_GetScanCommandError");
863
655
  var de_ListFindingsMetricsCommand = /* @__PURE__ */ __name(async (output, context) => {
864
656
  if (output.statusCode !== 200 && output.statusCode >= 300) {
865
- return de_ListFindingsMetricsCommandError(output, context);
657
+ return de_CommandError(output, context);
866
658
  }
867
659
  const contents = (0, import_smithy_client.map)({
868
660
  $metadata: deserializeMetadata(output)
@@ -875,37 +667,9 @@ var de_ListFindingsMetricsCommand = /* @__PURE__ */ __name(async (output, contex
875
667
  Object.assign(contents, doc);
876
668
  return contents;
877
669
  }, "de_ListFindingsMetricsCommand");
878
- var de_ListFindingsMetricsCommandError = /* @__PURE__ */ __name(async (output, context) => {
879
- const parsedOutput = {
880
- ...output,
881
- body: await parseErrorBody(output.body, context)
882
- };
883
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
884
- switch (errorCode) {
885
- case "AccessDeniedException":
886
- case "com.amazonaws.codegurusecurity#AccessDeniedException":
887
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
888
- case "InternalServerException":
889
- case "com.amazonaws.codegurusecurity#InternalServerException":
890
- throw await de_InternalServerExceptionRes(parsedOutput, context);
891
- case "ThrottlingException":
892
- case "com.amazonaws.codegurusecurity#ThrottlingException":
893
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
894
- case "ValidationException":
895
- case "com.amazonaws.codegurusecurity#ValidationException":
896
- throw await de_ValidationExceptionRes(parsedOutput, context);
897
- default:
898
- const parsedBody = parsedOutput.body;
899
- return throwDefaultError({
900
- output,
901
- parsedBody,
902
- errorCode
903
- });
904
- }
905
- }, "de_ListFindingsMetricsCommandError");
906
670
  var de_ListScansCommand = /* @__PURE__ */ __name(async (output, context) => {
907
671
  if (output.statusCode !== 200 && output.statusCode >= 300) {
908
- return de_ListScansCommandError(output, context);
672
+ return de_CommandError(output, context);
909
673
  }
910
674
  const contents = (0, import_smithy_client.map)({
911
675
  $metadata: deserializeMetadata(output)
@@ -918,37 +682,9 @@ var de_ListScansCommand = /* @__PURE__ */ __name(async (output, context) => {
918
682
  Object.assign(contents, doc);
919
683
  return contents;
920
684
  }, "de_ListScansCommand");
921
- var de_ListScansCommandError = /* @__PURE__ */ __name(async (output, context) => {
922
- const parsedOutput = {
923
- ...output,
924
- body: await parseErrorBody(output.body, context)
925
- };
926
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
927
- switch (errorCode) {
928
- case "AccessDeniedException":
929
- case "com.amazonaws.codegurusecurity#AccessDeniedException":
930
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
931
- case "InternalServerException":
932
- case "com.amazonaws.codegurusecurity#InternalServerException":
933
- throw await de_InternalServerExceptionRes(parsedOutput, context);
934
- case "ThrottlingException":
935
- case "com.amazonaws.codegurusecurity#ThrottlingException":
936
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
937
- case "ValidationException":
938
- case "com.amazonaws.codegurusecurity#ValidationException":
939
- throw await de_ValidationExceptionRes(parsedOutput, context);
940
- default:
941
- const parsedBody = parsedOutput.body;
942
- return throwDefaultError({
943
- output,
944
- parsedBody,
945
- errorCode
946
- });
947
- }
948
- }, "de_ListScansCommandError");
949
685
  var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
950
686
  if (output.statusCode !== 200 && output.statusCode >= 300) {
951
- return de_ListTagsForResourceCommandError(output, context);
687
+ return de_CommandError(output, context);
952
688
  }
953
689
  const contents = (0, import_smithy_client.map)({
954
690
  $metadata: deserializeMetadata(output)
@@ -960,43 +696,9 @@ var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, contex
960
696
  Object.assign(contents, doc);
961
697
  return contents;
962
698
  }, "de_ListTagsForResourceCommand");
963
- var de_ListTagsForResourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
964
- const parsedOutput = {
965
- ...output,
966
- body: await parseErrorBody(output.body, context)
967
- };
968
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
969
- switch (errorCode) {
970
- case "AccessDeniedException":
971
- case "com.amazonaws.codegurusecurity#AccessDeniedException":
972
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
973
- case "ConflictException":
974
- case "com.amazonaws.codegurusecurity#ConflictException":
975
- throw await de_ConflictExceptionRes(parsedOutput, context);
976
- case "InternalServerException":
977
- case "com.amazonaws.codegurusecurity#InternalServerException":
978
- throw await de_InternalServerExceptionRes(parsedOutput, context);
979
- case "ResourceNotFoundException":
980
- case "com.amazonaws.codegurusecurity#ResourceNotFoundException":
981
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
982
- case "ThrottlingException":
983
- case "com.amazonaws.codegurusecurity#ThrottlingException":
984
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
985
- case "ValidationException":
986
- case "com.amazonaws.codegurusecurity#ValidationException":
987
- throw await de_ValidationExceptionRes(parsedOutput, context);
988
- default:
989
- const parsedBody = parsedOutput.body;
990
- return throwDefaultError({
991
- output,
992
- parsedBody,
993
- errorCode
994
- });
995
- }
996
- }, "de_ListTagsForResourceCommandError");
997
699
  var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
998
700
  if (output.statusCode !== 204 && output.statusCode >= 300) {
999
- return de_TagResourceCommandError(output, context);
701
+ return de_CommandError(output, context);
1000
702
  }
1001
703
  const contents = (0, import_smithy_client.map)({
1002
704
  $metadata: deserializeMetadata(output)
@@ -1004,43 +706,9 @@ var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
1004
706
  await (0, import_smithy_client.collectBody)(output.body, context);
1005
707
  return contents;
1006
708
  }, "de_TagResourceCommand");
1007
- var de_TagResourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
1008
- const parsedOutput = {
1009
- ...output,
1010
- body: await parseErrorBody(output.body, context)
1011
- };
1012
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1013
- switch (errorCode) {
1014
- case "AccessDeniedException":
1015
- case "com.amazonaws.codegurusecurity#AccessDeniedException":
1016
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1017
- case "ConflictException":
1018
- case "com.amazonaws.codegurusecurity#ConflictException":
1019
- throw await de_ConflictExceptionRes(parsedOutput, context);
1020
- case "InternalServerException":
1021
- case "com.amazonaws.codegurusecurity#InternalServerException":
1022
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1023
- case "ResourceNotFoundException":
1024
- case "com.amazonaws.codegurusecurity#ResourceNotFoundException":
1025
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1026
- case "ThrottlingException":
1027
- case "com.amazonaws.codegurusecurity#ThrottlingException":
1028
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1029
- case "ValidationException":
1030
- case "com.amazonaws.codegurusecurity#ValidationException":
1031
- throw await de_ValidationExceptionRes(parsedOutput, context);
1032
- default:
1033
- const parsedBody = parsedOutput.body;
1034
- return throwDefaultError({
1035
- output,
1036
- parsedBody,
1037
- errorCode
1038
- });
1039
- }
1040
- }, "de_TagResourceCommandError");
1041
709
  var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
1042
710
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1043
- return de_UntagResourceCommandError(output, context);
711
+ return de_CommandError(output, context);
1044
712
  }
1045
713
  const contents = (0, import_smithy_client.map)({
1046
714
  $metadata: deserializeMetadata(output)
@@ -1048,43 +716,9 @@ var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) =>
1048
716
  await (0, import_smithy_client.collectBody)(output.body, context);
1049
717
  return contents;
1050
718
  }, "de_UntagResourceCommand");
1051
- var de_UntagResourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
1052
- const parsedOutput = {
1053
- ...output,
1054
- body: await parseErrorBody(output.body, context)
1055
- };
1056
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1057
- switch (errorCode) {
1058
- case "AccessDeniedException":
1059
- case "com.amazonaws.codegurusecurity#AccessDeniedException":
1060
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1061
- case "ConflictException":
1062
- case "com.amazonaws.codegurusecurity#ConflictException":
1063
- throw await de_ConflictExceptionRes(parsedOutput, context);
1064
- case "InternalServerException":
1065
- case "com.amazonaws.codegurusecurity#InternalServerException":
1066
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1067
- case "ResourceNotFoundException":
1068
- case "com.amazonaws.codegurusecurity#ResourceNotFoundException":
1069
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1070
- case "ThrottlingException":
1071
- case "com.amazonaws.codegurusecurity#ThrottlingException":
1072
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1073
- case "ValidationException":
1074
- case "com.amazonaws.codegurusecurity#ValidationException":
1075
- throw await de_ValidationExceptionRes(parsedOutput, context);
1076
- default:
1077
- const parsedBody = parsedOutput.body;
1078
- return throwDefaultError({
1079
- output,
1080
- parsedBody,
1081
- errorCode
1082
- });
1083
- }
1084
- }, "de_UntagResourceCommandError");
1085
719
  var de_UpdateAccountConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => {
1086
720
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1087
- return de_UpdateAccountConfigurationCommandError(output, context);
721
+ return de_CommandError(output, context);
1088
722
  }
1089
723
  const contents = (0, import_smithy_client.map)({
1090
724
  $metadata: deserializeMetadata(output)
@@ -1096,7 +730,7 @@ var de_UpdateAccountConfigurationCommand = /* @__PURE__ */ __name(async (output,
1096
730
  Object.assign(contents, doc);
1097
731
  return contents;
1098
732
  }, "de_UpdateAccountConfigurationCommand");
1099
- var de_UpdateAccountConfigurationCommandError = /* @__PURE__ */ __name(async (output, context) => {
733
+ var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
1100
734
  const parsedOutput = {
1101
735
  ...output,
1102
736
  body: await parseErrorBody(output.body, context)
@@ -1109,15 +743,18 @@ var de_UpdateAccountConfigurationCommandError = /* @__PURE__ */ __name(async (ou
1109
743
  case "InternalServerException":
1110
744
  case "com.amazonaws.codegurusecurity#InternalServerException":
1111
745
  throw await de_InternalServerExceptionRes(parsedOutput, context);
1112
- case "ResourceNotFoundException":
1113
- case "com.amazonaws.codegurusecurity#ResourceNotFoundException":
1114
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1115
746
  case "ThrottlingException":
1116
747
  case "com.amazonaws.codegurusecurity#ThrottlingException":
1117
748
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1118
749
  case "ValidationException":
1119
750
  case "com.amazonaws.codegurusecurity#ValidationException":
1120
751
  throw await de_ValidationExceptionRes(parsedOutput, context);
752
+ case "ConflictException":
753
+ case "com.amazonaws.codegurusecurity#ConflictException":
754
+ throw await de_ConflictExceptionRes(parsedOutput, context);
755
+ case "ResourceNotFoundException":
756
+ case "com.amazonaws.codegurusecurity#ResourceNotFoundException":
757
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1121
758
  default:
1122
759
  const parsedBody = parsedOutput.body;
1123
760
  return throwDefaultError({
@@ -1126,7 +763,7 @@ var de_UpdateAccountConfigurationCommandError = /* @__PURE__ */ __name(async (ou
1126
763
  errorCode
1127
764
  });
1128
765
  }
1129
- }, "de_UpdateAccountConfigurationCommandError");
766
+ }, "de_CommandError");
1130
767
  var throwDefaultError = (0, import_smithy_client.withBaseException)(CodeGuruSecurityServiceException);
1131
768
  var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1132
769
  const contents = (0, import_smithy_client.map)({});
@@ -184,7 +184,7 @@ export const se_UpdateAccountConfigurationCommand = async (input, context) => {
184
184
  };
185
185
  export const de_BatchGetFindingsCommand = async (output, context) => {
186
186
  if (output.statusCode !== 200 && output.statusCode >= 300) {
187
- return de_BatchGetFindingsCommandError(output, context);
187
+ return de_CommandError(output, context);
188
188
  }
189
189
  const contents = map({
190
190
  $metadata: deserializeMetadata(output),
@@ -197,37 +197,9 @@ export const de_BatchGetFindingsCommand = async (output, context) => {
197
197
  Object.assign(contents, doc);
198
198
  return contents;
199
199
  };
200
- const de_BatchGetFindingsCommandError = async (output, context) => {
201
- const parsedOutput = {
202
- ...output,
203
- body: await parseErrorBody(output.body, context),
204
- };
205
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
206
- switch (errorCode) {
207
- case "AccessDeniedException":
208
- case "com.amazonaws.codegurusecurity#AccessDeniedException":
209
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
210
- case "InternalServerException":
211
- case "com.amazonaws.codegurusecurity#InternalServerException":
212
- throw await de_InternalServerExceptionRes(parsedOutput, context);
213
- case "ThrottlingException":
214
- case "com.amazonaws.codegurusecurity#ThrottlingException":
215
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
216
- case "ValidationException":
217
- case "com.amazonaws.codegurusecurity#ValidationException":
218
- throw await de_ValidationExceptionRes(parsedOutput, context);
219
- default:
220
- const parsedBody = parsedOutput.body;
221
- return throwDefaultError({
222
- output,
223
- parsedBody,
224
- errorCode,
225
- });
226
- }
227
- };
228
200
  export const de_CreateScanCommand = async (output, context) => {
229
201
  if (output.statusCode !== 200 && output.statusCode >= 300) {
230
- return de_CreateScanCommandError(output, context);
202
+ return de_CommandError(output, context);
231
203
  }
232
204
  const contents = map({
233
205
  $metadata: deserializeMetadata(output),
@@ -243,43 +215,9 @@ export const de_CreateScanCommand = async (output, context) => {
243
215
  Object.assign(contents, doc);
244
216
  return contents;
245
217
  };
246
- const de_CreateScanCommandError = async (output, context) => {
247
- const parsedOutput = {
248
- ...output,
249
- body: await parseErrorBody(output.body, context),
250
- };
251
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
252
- switch (errorCode) {
253
- case "AccessDeniedException":
254
- case "com.amazonaws.codegurusecurity#AccessDeniedException":
255
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
256
- case "ConflictException":
257
- case "com.amazonaws.codegurusecurity#ConflictException":
258
- throw await de_ConflictExceptionRes(parsedOutput, context);
259
- case "InternalServerException":
260
- case "com.amazonaws.codegurusecurity#InternalServerException":
261
- throw await de_InternalServerExceptionRes(parsedOutput, context);
262
- case "ResourceNotFoundException":
263
- case "com.amazonaws.codegurusecurity#ResourceNotFoundException":
264
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
265
- case "ThrottlingException":
266
- case "com.amazonaws.codegurusecurity#ThrottlingException":
267
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
268
- case "ValidationException":
269
- case "com.amazonaws.codegurusecurity#ValidationException":
270
- throw await de_ValidationExceptionRes(parsedOutput, context);
271
- default:
272
- const parsedBody = parsedOutput.body;
273
- return throwDefaultError({
274
- output,
275
- parsedBody,
276
- errorCode,
277
- });
278
- }
279
- };
280
218
  export const de_CreateUploadUrlCommand = async (output, context) => {
281
219
  if (output.statusCode !== 200 && output.statusCode >= 300) {
282
- return de_CreateUploadUrlCommandError(output, context);
220
+ return de_CommandError(output, context);
283
221
  }
284
222
  const contents = map({
285
223
  $metadata: deserializeMetadata(output),
@@ -293,37 +231,9 @@ export const de_CreateUploadUrlCommand = async (output, context) => {
293
231
  Object.assign(contents, doc);
294
232
  return contents;
295
233
  };
296
- const de_CreateUploadUrlCommandError = async (output, context) => {
297
- const parsedOutput = {
298
- ...output,
299
- body: await parseErrorBody(output.body, context),
300
- };
301
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
302
- switch (errorCode) {
303
- case "AccessDeniedException":
304
- case "com.amazonaws.codegurusecurity#AccessDeniedException":
305
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
306
- case "InternalServerException":
307
- case "com.amazonaws.codegurusecurity#InternalServerException":
308
- throw await de_InternalServerExceptionRes(parsedOutput, context);
309
- case "ThrottlingException":
310
- case "com.amazonaws.codegurusecurity#ThrottlingException":
311
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
312
- case "ValidationException":
313
- case "com.amazonaws.codegurusecurity#ValidationException":
314
- throw await de_ValidationExceptionRes(parsedOutput, context);
315
- default:
316
- const parsedBody = parsedOutput.body;
317
- return throwDefaultError({
318
- output,
319
- parsedBody,
320
- errorCode,
321
- });
322
- }
323
- };
324
234
  export const de_GetAccountConfigurationCommand = async (output, context) => {
325
235
  if (output.statusCode !== 200 && output.statusCode >= 300) {
326
- return de_GetAccountConfigurationCommandError(output, context);
236
+ return de_CommandError(output, context);
327
237
  }
328
238
  const contents = map({
329
239
  $metadata: deserializeMetadata(output),
@@ -335,37 +245,9 @@ export const de_GetAccountConfigurationCommand = async (output, context) => {
335
245
  Object.assign(contents, doc);
336
246
  return contents;
337
247
  };
338
- const de_GetAccountConfigurationCommandError = async (output, context) => {
339
- const parsedOutput = {
340
- ...output,
341
- body: await parseErrorBody(output.body, context),
342
- };
343
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
344
- switch (errorCode) {
345
- case "AccessDeniedException":
346
- case "com.amazonaws.codegurusecurity#AccessDeniedException":
347
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
348
- case "InternalServerException":
349
- case "com.amazonaws.codegurusecurity#InternalServerException":
350
- throw await de_InternalServerExceptionRes(parsedOutput, context);
351
- case "ThrottlingException":
352
- case "com.amazonaws.codegurusecurity#ThrottlingException":
353
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
354
- case "ValidationException":
355
- case "com.amazonaws.codegurusecurity#ValidationException":
356
- throw await de_ValidationExceptionRes(parsedOutput, context);
357
- default:
358
- const parsedBody = parsedOutput.body;
359
- return throwDefaultError({
360
- output,
361
- parsedBody,
362
- errorCode,
363
- });
364
- }
365
- };
366
248
  export const de_GetFindingsCommand = async (output, context) => {
367
249
  if (output.statusCode !== 200 && output.statusCode >= 300) {
368
- return de_GetFindingsCommandError(output, context);
250
+ return de_CommandError(output, context);
369
251
  }
370
252
  const contents = map({
371
253
  $metadata: deserializeMetadata(output),
@@ -378,43 +260,9 @@ export const de_GetFindingsCommand = async (output, context) => {
378
260
  Object.assign(contents, doc);
379
261
  return contents;
380
262
  };
381
- const de_GetFindingsCommandError = async (output, context) => {
382
- const parsedOutput = {
383
- ...output,
384
- body: await parseErrorBody(output.body, context),
385
- };
386
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
387
- switch (errorCode) {
388
- case "AccessDeniedException":
389
- case "com.amazonaws.codegurusecurity#AccessDeniedException":
390
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
391
- case "ConflictException":
392
- case "com.amazonaws.codegurusecurity#ConflictException":
393
- throw await de_ConflictExceptionRes(parsedOutput, context);
394
- case "InternalServerException":
395
- case "com.amazonaws.codegurusecurity#InternalServerException":
396
- throw await de_InternalServerExceptionRes(parsedOutput, context);
397
- case "ResourceNotFoundException":
398
- case "com.amazonaws.codegurusecurity#ResourceNotFoundException":
399
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
400
- case "ThrottlingException":
401
- case "com.amazonaws.codegurusecurity#ThrottlingException":
402
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
403
- case "ValidationException":
404
- case "com.amazonaws.codegurusecurity#ValidationException":
405
- throw await de_ValidationExceptionRes(parsedOutput, context);
406
- default:
407
- const parsedBody = parsedOutput.body;
408
- return throwDefaultError({
409
- output,
410
- parsedBody,
411
- errorCode,
412
- });
413
- }
414
- };
415
263
  export const de_GetMetricsSummaryCommand = async (output, context) => {
416
264
  if (output.statusCode !== 200 && output.statusCode >= 300) {
417
- return de_GetMetricsSummaryCommandError(output, context);
265
+ return de_CommandError(output, context);
418
266
  }
419
267
  const contents = map({
420
268
  $metadata: deserializeMetadata(output),
@@ -426,37 +274,9 @@ export const de_GetMetricsSummaryCommand = async (output, context) => {
426
274
  Object.assign(contents, doc);
427
275
  return contents;
428
276
  };
429
- const de_GetMetricsSummaryCommandError = async (output, context) => {
430
- const parsedOutput = {
431
- ...output,
432
- body: await parseErrorBody(output.body, context),
433
- };
434
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
435
- switch (errorCode) {
436
- case "AccessDeniedException":
437
- case "com.amazonaws.codegurusecurity#AccessDeniedException":
438
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
439
- case "InternalServerException":
440
- case "com.amazonaws.codegurusecurity#InternalServerException":
441
- throw await de_InternalServerExceptionRes(parsedOutput, context);
442
- case "ThrottlingException":
443
- case "com.amazonaws.codegurusecurity#ThrottlingException":
444
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
445
- case "ValidationException":
446
- case "com.amazonaws.codegurusecurity#ValidationException":
447
- throw await de_ValidationExceptionRes(parsedOutput, context);
448
- default:
449
- const parsedBody = parsedOutput.body;
450
- return throwDefaultError({
451
- output,
452
- parsedBody,
453
- errorCode,
454
- });
455
- }
456
- };
457
277
  export const de_GetScanCommand = async (output, context) => {
458
278
  if (output.statusCode !== 200 && output.statusCode >= 300) {
459
- return de_GetScanCommandError(output, context);
279
+ return de_CommandError(output, context);
460
280
  }
461
281
  const contents = map({
462
282
  $metadata: deserializeMetadata(output),
@@ -475,37 +295,9 @@ export const de_GetScanCommand = async (output, context) => {
475
295
  Object.assign(contents, doc);
476
296
  return contents;
477
297
  };
478
- const de_GetScanCommandError = async (output, context) => {
479
- const parsedOutput = {
480
- ...output,
481
- body: await parseErrorBody(output.body, context),
482
- };
483
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
484
- switch (errorCode) {
485
- case "AccessDeniedException":
486
- case "com.amazonaws.codegurusecurity#AccessDeniedException":
487
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
488
- case "InternalServerException":
489
- case "com.amazonaws.codegurusecurity#InternalServerException":
490
- throw await de_InternalServerExceptionRes(parsedOutput, context);
491
- case "ResourceNotFoundException":
492
- case "com.amazonaws.codegurusecurity#ResourceNotFoundException":
493
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
494
- case "ThrottlingException":
495
- case "com.amazonaws.codegurusecurity#ThrottlingException":
496
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
497
- default:
498
- const parsedBody = parsedOutput.body;
499
- return throwDefaultError({
500
- output,
501
- parsedBody,
502
- errorCode,
503
- });
504
- }
505
- };
506
298
  export const de_ListFindingsMetricsCommand = async (output, context) => {
507
299
  if (output.statusCode !== 200 && output.statusCode >= 300) {
508
- return de_ListFindingsMetricsCommandError(output, context);
300
+ return de_CommandError(output, context);
509
301
  }
510
302
  const contents = map({
511
303
  $metadata: deserializeMetadata(output),
@@ -518,37 +310,9 @@ export const de_ListFindingsMetricsCommand = async (output, context) => {
518
310
  Object.assign(contents, doc);
519
311
  return contents;
520
312
  };
521
- const de_ListFindingsMetricsCommandError = async (output, context) => {
522
- const parsedOutput = {
523
- ...output,
524
- body: await parseErrorBody(output.body, context),
525
- };
526
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
527
- switch (errorCode) {
528
- case "AccessDeniedException":
529
- case "com.amazonaws.codegurusecurity#AccessDeniedException":
530
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
531
- case "InternalServerException":
532
- case "com.amazonaws.codegurusecurity#InternalServerException":
533
- throw await de_InternalServerExceptionRes(parsedOutput, context);
534
- case "ThrottlingException":
535
- case "com.amazonaws.codegurusecurity#ThrottlingException":
536
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
537
- case "ValidationException":
538
- case "com.amazonaws.codegurusecurity#ValidationException":
539
- throw await de_ValidationExceptionRes(parsedOutput, context);
540
- default:
541
- const parsedBody = parsedOutput.body;
542
- return throwDefaultError({
543
- output,
544
- parsedBody,
545
- errorCode,
546
- });
547
- }
548
- };
549
313
  export const de_ListScansCommand = async (output, context) => {
550
314
  if (output.statusCode !== 200 && output.statusCode >= 300) {
551
- return de_ListScansCommandError(output, context);
315
+ return de_CommandError(output, context);
552
316
  }
553
317
  const contents = map({
554
318
  $metadata: deserializeMetadata(output),
@@ -561,37 +325,9 @@ export const de_ListScansCommand = async (output, context) => {
561
325
  Object.assign(contents, doc);
562
326
  return contents;
563
327
  };
564
- const de_ListScansCommandError = async (output, context) => {
565
- const parsedOutput = {
566
- ...output,
567
- body: await parseErrorBody(output.body, context),
568
- };
569
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
570
- switch (errorCode) {
571
- case "AccessDeniedException":
572
- case "com.amazonaws.codegurusecurity#AccessDeniedException":
573
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
574
- case "InternalServerException":
575
- case "com.amazonaws.codegurusecurity#InternalServerException":
576
- throw await de_InternalServerExceptionRes(parsedOutput, context);
577
- case "ThrottlingException":
578
- case "com.amazonaws.codegurusecurity#ThrottlingException":
579
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
580
- case "ValidationException":
581
- case "com.amazonaws.codegurusecurity#ValidationException":
582
- throw await de_ValidationExceptionRes(parsedOutput, context);
583
- default:
584
- const parsedBody = parsedOutput.body;
585
- return throwDefaultError({
586
- output,
587
- parsedBody,
588
- errorCode,
589
- });
590
- }
591
- };
592
328
  export const de_ListTagsForResourceCommand = async (output, context) => {
593
329
  if (output.statusCode !== 200 && output.statusCode >= 300) {
594
- return de_ListTagsForResourceCommandError(output, context);
330
+ return de_CommandError(output, context);
595
331
  }
596
332
  const contents = map({
597
333
  $metadata: deserializeMetadata(output),
@@ -603,43 +339,9 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
603
339
  Object.assign(contents, doc);
604
340
  return contents;
605
341
  };
606
- const de_ListTagsForResourceCommandError = async (output, context) => {
607
- const parsedOutput = {
608
- ...output,
609
- body: await parseErrorBody(output.body, context),
610
- };
611
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
612
- switch (errorCode) {
613
- case "AccessDeniedException":
614
- case "com.amazonaws.codegurusecurity#AccessDeniedException":
615
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
616
- case "ConflictException":
617
- case "com.amazonaws.codegurusecurity#ConflictException":
618
- throw await de_ConflictExceptionRes(parsedOutput, context);
619
- case "InternalServerException":
620
- case "com.amazonaws.codegurusecurity#InternalServerException":
621
- throw await de_InternalServerExceptionRes(parsedOutput, context);
622
- case "ResourceNotFoundException":
623
- case "com.amazonaws.codegurusecurity#ResourceNotFoundException":
624
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
625
- case "ThrottlingException":
626
- case "com.amazonaws.codegurusecurity#ThrottlingException":
627
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
628
- case "ValidationException":
629
- case "com.amazonaws.codegurusecurity#ValidationException":
630
- throw await de_ValidationExceptionRes(parsedOutput, context);
631
- default:
632
- const parsedBody = parsedOutput.body;
633
- return throwDefaultError({
634
- output,
635
- parsedBody,
636
- errorCode,
637
- });
638
- }
639
- };
640
342
  export const de_TagResourceCommand = async (output, context) => {
641
343
  if (output.statusCode !== 204 && output.statusCode >= 300) {
642
- return de_TagResourceCommandError(output, context);
344
+ return de_CommandError(output, context);
643
345
  }
644
346
  const contents = map({
645
347
  $metadata: deserializeMetadata(output),
@@ -647,43 +349,9 @@ export const de_TagResourceCommand = async (output, context) => {
647
349
  await collectBody(output.body, context);
648
350
  return contents;
649
351
  };
650
- const de_TagResourceCommandError = async (output, context) => {
651
- const parsedOutput = {
652
- ...output,
653
- body: await parseErrorBody(output.body, context),
654
- };
655
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
656
- switch (errorCode) {
657
- case "AccessDeniedException":
658
- case "com.amazonaws.codegurusecurity#AccessDeniedException":
659
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
660
- case "ConflictException":
661
- case "com.amazonaws.codegurusecurity#ConflictException":
662
- throw await de_ConflictExceptionRes(parsedOutput, context);
663
- case "InternalServerException":
664
- case "com.amazonaws.codegurusecurity#InternalServerException":
665
- throw await de_InternalServerExceptionRes(parsedOutput, context);
666
- case "ResourceNotFoundException":
667
- case "com.amazonaws.codegurusecurity#ResourceNotFoundException":
668
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
669
- case "ThrottlingException":
670
- case "com.amazonaws.codegurusecurity#ThrottlingException":
671
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
672
- case "ValidationException":
673
- case "com.amazonaws.codegurusecurity#ValidationException":
674
- throw await de_ValidationExceptionRes(parsedOutput, context);
675
- default:
676
- const parsedBody = parsedOutput.body;
677
- return throwDefaultError({
678
- output,
679
- parsedBody,
680
- errorCode,
681
- });
682
- }
683
- };
684
352
  export const de_UntagResourceCommand = async (output, context) => {
685
353
  if (output.statusCode !== 204 && output.statusCode >= 300) {
686
- return de_UntagResourceCommandError(output, context);
354
+ return de_CommandError(output, context);
687
355
  }
688
356
  const contents = map({
689
357
  $metadata: deserializeMetadata(output),
@@ -691,43 +359,9 @@ export const de_UntagResourceCommand = async (output, context) => {
691
359
  await collectBody(output.body, context);
692
360
  return contents;
693
361
  };
694
- const de_UntagResourceCommandError = async (output, context) => {
695
- const parsedOutput = {
696
- ...output,
697
- body: await parseErrorBody(output.body, context),
698
- };
699
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
700
- switch (errorCode) {
701
- case "AccessDeniedException":
702
- case "com.amazonaws.codegurusecurity#AccessDeniedException":
703
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
704
- case "ConflictException":
705
- case "com.amazonaws.codegurusecurity#ConflictException":
706
- throw await de_ConflictExceptionRes(parsedOutput, context);
707
- case "InternalServerException":
708
- case "com.amazonaws.codegurusecurity#InternalServerException":
709
- throw await de_InternalServerExceptionRes(parsedOutput, context);
710
- case "ResourceNotFoundException":
711
- case "com.amazonaws.codegurusecurity#ResourceNotFoundException":
712
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
713
- case "ThrottlingException":
714
- case "com.amazonaws.codegurusecurity#ThrottlingException":
715
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
716
- case "ValidationException":
717
- case "com.amazonaws.codegurusecurity#ValidationException":
718
- throw await de_ValidationExceptionRes(parsedOutput, context);
719
- default:
720
- const parsedBody = parsedOutput.body;
721
- return throwDefaultError({
722
- output,
723
- parsedBody,
724
- errorCode,
725
- });
726
- }
727
- };
728
362
  export const de_UpdateAccountConfigurationCommand = async (output, context) => {
729
363
  if (output.statusCode !== 200 && output.statusCode >= 300) {
730
- return de_UpdateAccountConfigurationCommandError(output, context);
364
+ return de_CommandError(output, context);
731
365
  }
732
366
  const contents = map({
733
367
  $metadata: deserializeMetadata(output),
@@ -739,7 +373,7 @@ export const de_UpdateAccountConfigurationCommand = async (output, context) => {
739
373
  Object.assign(contents, doc);
740
374
  return contents;
741
375
  };
742
- const de_UpdateAccountConfigurationCommandError = async (output, context) => {
376
+ const de_CommandError = async (output, context) => {
743
377
  const parsedOutput = {
744
378
  ...output,
745
379
  body: await parseErrorBody(output.body, context),
@@ -752,15 +386,18 @@ const de_UpdateAccountConfigurationCommandError = async (output, context) => {
752
386
  case "InternalServerException":
753
387
  case "com.amazonaws.codegurusecurity#InternalServerException":
754
388
  throw await de_InternalServerExceptionRes(parsedOutput, context);
755
- case "ResourceNotFoundException":
756
- case "com.amazonaws.codegurusecurity#ResourceNotFoundException":
757
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
758
389
  case "ThrottlingException":
759
390
  case "com.amazonaws.codegurusecurity#ThrottlingException":
760
391
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
761
392
  case "ValidationException":
762
393
  case "com.amazonaws.codegurusecurity#ValidationException":
763
394
  throw await de_ValidationExceptionRes(parsedOutput, context);
395
+ case "ConflictException":
396
+ case "com.amazonaws.codegurusecurity#ConflictException":
397
+ throw await de_ConflictExceptionRes(parsedOutput, context);
398
+ case "ResourceNotFoundException":
399
+ case "com.amazonaws.codegurusecurity#ResourceNotFoundException":
400
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
764
401
  default:
765
402
  const parsedBody = parsedOutput.body;
766
403
  return throwDefaultError({
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-codeguru-security",
3
3
  "description": "AWS SDK for JavaScript Codeguru Security Client for Node.js, Browser and React Native",
4
- "version": "3.503.1",
4
+ "version": "3.507.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "node ../../scripts/compilation/inline client-codeguru-security",
@@ -20,9 +20,9 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "3.0.0",
22
22
  "@aws-crypto/sha256-js": "3.0.0",
23
- "@aws-sdk/client-sts": "3.502.0",
23
+ "@aws-sdk/client-sts": "3.507.0",
24
24
  "@aws-sdk/core": "3.496.0",
25
- "@aws-sdk/credential-provider-node": "3.503.1",
25
+ "@aws-sdk/credential-provider-node": "3.507.0",
26
26
  "@aws-sdk/middleware-host-header": "3.502.0",
27
27
  "@aws-sdk/middleware-logger": "3.502.0",
28
28
  "@aws-sdk/middleware-recursion-detection": "3.502.0",