@@ -2629,11 +2629,16 @@ export class GitHubApi implements Disposable {
26292629 }
26302630 }
26312631
2632- private handleException ( ex : Error , provider : Provider | undefined , scope : LogScope | undefined ) : Error {
2632+ private handleException (
2633+ ex : Error ,
2634+ provider : Provider | undefined ,
2635+ scope : LogScope | undefined ,
2636+ silent ?: boolean ,
2637+ ) : Error {
26332638 Logger . error ( ex , scope ) ;
26342639 // debugger;
26352640
2636- if ( ex instanceof AuthenticationError ) {
2641+ if ( ex instanceof AuthenticationError && ! silent ) {
26372642 void this . showAuthenticationErrorMessage ( ex , provider ) ;
26382643 }
26392644 return ex ;
@@ -2706,7 +2711,14 @@ export class GitHubApi implements Disposable {
27062711 async searchMyPullRequests (
27072712 provider : Provider ,
27082713 token : string ,
2709- options ?: { search ?: string ; user ?: string ; repos ?: string [ ] ; baseUrl ?: string ; avatarSize ?: number } ,
2714+ options ?: {
2715+ search ?: string ;
2716+ user ?: string ;
2717+ repos ?: string [ ] ;
2718+ baseUrl ?: string ;
2719+ avatarSize ?: number ;
2720+ silent ?: boolean ;
2721+ } ,
27102722 cancellation ?: CancellationToken ,
27112723 ) : Promise < SearchedPullRequest [ ] > {
27122724 const scope = getLogScope ( ) ;
@@ -2817,15 +2829,22 @@ export class GitHubApi implements Disposable {
28172829 ) ;
28182830 return results ;
28192831 } catch ( ex ) {
2820- throw this . handleException ( ex , provider , scope ) ;
2832+ throw this . handleException ( ex , provider , scope , options ?. silent ) ;
28212833 }
28222834 }
28232835
28242836 @debug < GitHubApi [ 'searchMyInvolvedPullRequests' ] > ( { args : { 0 : p => p . name , 1 : '<token>' } } )
28252837 private async searchMyInvolvedPullRequests (
28262838 provider : Provider ,
28272839 token : string ,
2828- options ?: { search ?: string ; user ?: string ; repos ?: string [ ] ; baseUrl ?: string ; avatarSize ?: number } ,
2840+ options ?: {
2841+ search ?: string ;
2842+ user ?: string ;
2843+ repos ?: string [ ] ;
2844+ baseUrl ?: string ;
2845+ avatarSize ?: number ;
2846+ silent ?: boolean ;
2847+ } ,
28292848 cancellation ?: CancellationToken ,
28302849 ) : Promise < SearchedPullRequest [ ] > {
28312850 const scope = getLogScope ( ) ;
@@ -2922,7 +2941,7 @@ export class GitHubApi implements Disposable {
29222941 const results : SearchedPullRequest [ ] = rsp . search . nodes . map ( pr => toQueryResult ( pr ) ) ;
29232942 return results ;
29242943 } catch ( ex ) {
2925- throw this . handleException ( ex , provider , scope ) ;
2944+ throw this . handleException ( ex , provider , scope , options ?. silent ) ;
29262945 }
29272946 }
29282947
0 commit comments