PM-7392 - ApiService - refreshIdentityToken - log error before swallowing it so we have a record of it.

This commit is contained in:
Jared Snider 2024-05-07 12:57:21 -04:00
parent 923c6cf36a
commit 935c97fbb6
No known key found for this signature in database
GPG Key ID: A149DDD612516286
1 changed files with 1 additions and 3 deletions

View File

@ -250,6 +250,7 @@ export class ApiService implements ApiServiceAbstraction {
try {
await this.doAuthRefresh();
} catch (e) {
this.logService.error("Error refreshing access token: ", e);
return Promise.reject(null);
}
}
@ -1724,9 +1725,6 @@ export class ApiService implements ApiServiceAbstraction {
this.i18nService.t("errorRefreshingAccessTokenDesc"),
);
// Log the error so it isn't lost. The error throw below is lost.
this.logService.error("Cannot refresh access token, no refresh token or api keys are stored.");
throw new Error("Cannot refresh access token, no refresh token or api keys are stored.");
}