Skip to content

Commit 0b07098

Browse files
Adds missing try/catches around account check-in cases
1 parent 6a49a22 commit 0b07098

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

src/plus/gk/subscriptionService.ts

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1699,7 +1699,14 @@ export class SubscriptionService implements Disposable {
16991699
return;
17001700
}
17011701

1702-
await this.checkInAndValidate(this._session, source, { force: true, organizationId: pick.org.id });
1702+
try {
1703+
await this.checkInAndValidate(this._session, source, { force: true, organizationId: pick.org.id });
1704+
} catch (ex) {
1705+
debugger;
1706+
Logger.error(ex, scope);
1707+
return;
1708+
}
1709+
17031710
const checkInData = await this._getCheckInData();
17041711
if (checkInData == null) return;
17051712

@@ -1745,9 +1752,17 @@ export class SubscriptionService implements Disposable {
17451752
}
17461753

17471754
async checkUpdatedSubscription(source: Source | undefined): Promise<SubscriptionState | undefined> {
1755+
const scope = getLogScope();
17481756
if (this._session == null) return undefined;
17491757
const oldSubscriptionState = this._subscription.state;
1750-
await this.checkInAndValidate(this._session, source, { force: true });
1758+
try {
1759+
await this.checkInAndValidate(this._session, source, { force: true });
1760+
} catch (ex) {
1761+
debugger;
1762+
Logger.error(ex, scope);
1763+
return undefined;
1764+
}
1765+
17511766
if (oldSubscriptionState !== this._subscription.state) {
17521767
void this.showPlanMessage({ source: 'subscription' });
17531768
}

0 commit comments

Comments
 (0)