Skip to content

Commit c179abf

Browse files
committed
Suppresses warning message on Launchpad load failure
(#4324)
1 parent 2e7fc05 commit c179abf

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/plus/integrations/models/gitHostIntegration.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -675,6 +675,7 @@ export abstract class GitHostIntegration<
675675
} catch (ex) {
676676
this.handleProviderException('searchMyPullRequests', ex, {
677677
scope: scope,
678+
silent: true,
678679
});
679680
return {
680681
error: ex,

src/plus/integrations/models/integration.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ export abstract class IntegrationBase<
312312
protected handleProviderException(
313313
syncReqUsecase: SyncReqUsecase,
314314
ex: Error,
315-
options?: { scope?: LogScope | undefined },
315+
options?: { scope?: LogScope | undefined; silent?: boolean },
316316
): void {
317317
if (ex instanceof CancellationError) return;
318318

@@ -326,10 +326,10 @@ export abstract class IntegrationBase<
326326
expiresAt: new Date(Date.now() - 1),
327327
};
328328
} else {
329-
this.trackRequestException();
329+
this.trackRequestException(options);
330330
}
331331
} else if (ex instanceof AuthenticationError || ex instanceof RequestClientError) {
332-
this.trackRequestException();
332+
this.trackRequestException(options);
333333
}
334334
}
335335

@@ -358,11 +358,13 @@ export abstract class IntegrationBase<
358358
}
359359

360360
@debug()
361-
trackRequestException(): void {
361+
trackRequestException(options?: { silent?: boolean }): void {
362362
this.requestExceptionCount++;
363363

364364
if (this.requestExceptionCount >= IntegrationBase.requestExceptionLimit && this._session !== null) {
365-
void showIntegrationDisconnectedTooManyFailedRequestsWarningMessage(this.name);
365+
if (!options?.silent) {
366+
void showIntegrationDisconnectedTooManyFailedRequestsWarningMessage(this.name);
367+
}
366368
void this.disconnect({ currentSessionOnly: true });
367369
}
368370
}

0 commit comments

Comments
 (0)