@@ -460,19 +460,20 @@ export class AWSIntegrationApiResponseProcessor {
460
460
await response . body . text ( ) ,
461
461
contentType
462
462
) ;
463
+ let body : APIErrorResponse ;
463
464
try {
464
- const body : APIErrorResponse = ObjectSerializer . deserialize (
465
+ body = ObjectSerializer . deserialize (
465
466
bodyText ,
466
467
"APIErrorResponse"
467
468
) as APIErrorResponse ;
468
- throw new ApiException < APIErrorResponse > ( response . httpStatusCode , body ) ;
469
469
} catch ( error ) {
470
470
logger . info ( `Got error deserializing error: ${ error } ` ) ;
471
471
throw new ApiException < APIErrorResponse > (
472
472
response . httpStatusCode ,
473
473
bodyText
474
474
) ;
475
475
}
476
+ throw new ApiException < APIErrorResponse > ( response . httpStatusCode , body ) ;
476
477
}
477
478
478
479
// Work around for missing responses in specification, e.g. for petstore.yaml
@@ -519,19 +520,20 @@ export class AWSIntegrationApiResponseProcessor {
519
520
await response . body . text ( ) ,
520
521
contentType
521
522
) ;
523
+ let body : APIErrorResponse ;
522
524
try {
523
- const body : APIErrorResponse = ObjectSerializer . deserialize (
525
+ body = ObjectSerializer . deserialize (
524
526
bodyText ,
525
527
"APIErrorResponse"
526
528
) as APIErrorResponse ;
527
- throw new ApiException < APIErrorResponse > ( response . httpStatusCode , body ) ;
528
529
} catch ( error ) {
529
530
logger . info ( `Got error deserializing error: ${ error } ` ) ;
530
531
throw new ApiException < APIErrorResponse > (
531
532
response . httpStatusCode ,
532
533
bodyText
533
534
) ;
534
535
}
536
+ throw new ApiException < APIErrorResponse > ( response . httpStatusCode , body ) ;
535
537
}
536
538
537
539
// Work around for missing responses in specification, e.g. for petstore.yaml
@@ -580,19 +582,20 @@ export class AWSIntegrationApiResponseProcessor {
580
582
await response . body . text ( ) ,
581
583
contentType
582
584
) ;
585
+ let body : APIErrorResponse ;
583
586
try {
584
- const body : APIErrorResponse = ObjectSerializer . deserialize (
587
+ body = ObjectSerializer . deserialize (
585
588
bodyText ,
586
589
"APIErrorResponse"
587
590
) as APIErrorResponse ;
588
- throw new ApiException < APIErrorResponse > ( response . httpStatusCode , body ) ;
589
591
} catch ( error ) {
590
592
logger . info ( `Got error deserializing error: ${ error } ` ) ;
591
593
throw new ApiException < APIErrorResponse > (
592
594
response . httpStatusCode ,
593
595
bodyText
594
596
) ;
595
597
}
598
+ throw new ApiException < APIErrorResponse > ( response . httpStatusCode , body ) ;
596
599
}
597
600
598
601
// Work around for missing responses in specification, e.g. for petstore.yaml
@@ -640,19 +643,20 @@ export class AWSIntegrationApiResponseProcessor {
640
643
await response . body . text ( ) ,
641
644
contentType
642
645
) ;
646
+ let body : APIErrorResponse ;
643
647
try {
644
- const body : APIErrorResponse = ObjectSerializer . deserialize (
648
+ body = ObjectSerializer . deserialize (
645
649
bodyText ,
646
650
"APIErrorResponse"
647
651
) as APIErrorResponse ;
648
- throw new ApiException < APIErrorResponse > ( response . httpStatusCode , body ) ;
649
652
} catch ( error ) {
650
653
logger . info ( `Got error deserializing error: ${ error } ` ) ;
651
654
throw new ApiException < APIErrorResponse > (
652
655
response . httpStatusCode ,
653
656
bodyText
654
657
) ;
655
658
}
659
+ throw new ApiException < APIErrorResponse > ( response . httpStatusCode , body ) ;
656
660
}
657
661
658
662
// Work around for missing responses in specification, e.g. for petstore.yaml
@@ -699,19 +703,20 @@ export class AWSIntegrationApiResponseProcessor {
699
703
await response . body . text ( ) ,
700
704
contentType
701
705
) ;
706
+ let body : APIErrorResponse ;
702
707
try {
703
- const body : APIErrorResponse = ObjectSerializer . deserialize (
708
+ body = ObjectSerializer . deserialize (
704
709
bodyText ,
705
710
"APIErrorResponse"
706
711
) as APIErrorResponse ;
707
- throw new ApiException < APIErrorResponse > ( response . httpStatusCode , body ) ;
708
712
} catch ( error ) {
709
713
logger . info ( `Got error deserializing error: ${ error } ` ) ;
710
714
throw new ApiException < APIErrorResponse > (
711
715
response . httpStatusCode ,
712
716
bodyText
713
717
) ;
714
718
}
719
+ throw new ApiException < APIErrorResponse > ( response . httpStatusCode , body ) ;
715
720
}
716
721
717
722
// Work around for missing responses in specification, e.g. for petstore.yaml
@@ -756,19 +761,20 @@ export class AWSIntegrationApiResponseProcessor {
756
761
await response . body . text ( ) ,
757
762
contentType
758
763
) ;
764
+ let body : APIErrorResponse ;
759
765
try {
760
- const body : APIErrorResponse = ObjectSerializer . deserialize (
766
+ body = ObjectSerializer . deserialize (
761
767
bodyText ,
762
768
"APIErrorResponse"
763
769
) as APIErrorResponse ;
764
- throw new ApiException < APIErrorResponse > ( response . httpStatusCode , body ) ;
765
770
} catch ( error ) {
766
771
logger . info ( `Got error deserializing error: ${ error } ` ) ;
767
772
throw new ApiException < APIErrorResponse > (
768
773
response . httpStatusCode ,
769
774
bodyText
770
775
) ;
771
776
}
777
+ throw new ApiException < APIErrorResponse > ( response . httpStatusCode , body ) ;
772
778
}
773
779
774
780
// Work around for missing responses in specification, e.g. for petstore.yaml
@@ -817,19 +823,20 @@ export class AWSIntegrationApiResponseProcessor {
817
823
await response . body . text ( ) ,
818
824
contentType
819
825
) ;
826
+ let body : APIErrorResponse ;
820
827
try {
821
- const body : APIErrorResponse = ObjectSerializer . deserialize (
828
+ body = ObjectSerializer . deserialize (
822
829
bodyText ,
823
830
"APIErrorResponse"
824
831
) as APIErrorResponse ;
825
- throw new ApiException < APIErrorResponse > ( response . httpStatusCode , body ) ;
826
832
} catch ( error ) {
827
833
logger . info ( `Got error deserializing error: ${ error } ` ) ;
828
834
throw new ApiException < APIErrorResponse > (
829
835
response . httpStatusCode ,
830
836
bodyText
831
837
) ;
832
838
}
839
+ throw new ApiException < APIErrorResponse > ( response . httpStatusCode , body ) ;
833
840
}
834
841
835
842
// Work around for missing responses in specification, e.g. for petstore.yaml
@@ -878,19 +885,20 @@ export class AWSIntegrationApiResponseProcessor {
878
885
await response . body . text ( ) ,
879
886
contentType
880
887
) ;
888
+ let body : APIErrorResponse ;
881
889
try {
882
- const body : APIErrorResponse = ObjectSerializer . deserialize (
890
+ body = ObjectSerializer . deserialize (
883
891
bodyText ,
884
892
"APIErrorResponse"
885
893
) as APIErrorResponse ;
886
- throw new ApiException < APIErrorResponse > ( response . httpStatusCode , body ) ;
887
894
} catch ( error ) {
888
895
logger . info ( `Got error deserializing error: ${ error } ` ) ;
889
896
throw new ApiException < APIErrorResponse > (
890
897
response . httpStatusCode ,
891
898
bodyText
892
899
) ;
893
900
}
901
+ throw new ApiException < APIErrorResponse > ( response . httpStatusCode , body ) ;
894
902
}
895
903
896
904
// Work around for missing responses in specification, e.g. for petstore.yaml
@@ -938,19 +946,20 @@ export class AWSIntegrationApiResponseProcessor {
938
946
await response . body . text ( ) ,
939
947
contentType
940
948
) ;
949
+ let body : APIErrorResponse ;
941
950
try {
942
- const body : APIErrorResponse = ObjectSerializer . deserialize (
951
+ body = ObjectSerializer . deserialize (
943
952
bodyText ,
944
953
"APIErrorResponse"
945
954
) as APIErrorResponse ;
946
- throw new ApiException < APIErrorResponse > ( response . httpStatusCode , body ) ;
947
955
} catch ( error ) {
948
956
logger . info ( `Got error deserializing error: ${ error } ` ) ;
949
957
throw new ApiException < APIErrorResponse > (
950
958
response . httpStatusCode ,
951
959
bodyText
952
960
) ;
953
961
}
962
+ throw new ApiException < APIErrorResponse > ( response . httpStatusCode , body ) ;
954
963
}
955
964
956
965
// Work around for missing responses in specification, e.g. for petstore.yaml
0 commit comments