mirror of
https://github.com/bitwarden/browser
synced 2025-12-30 07:03:26 +00:00
[PM-25458] Add error handling stubs & logging for critical decrypt paths (#16284)
* Add error handling stubs for critical decrypt paths * Fix collection name decrypt * Update docs * address feedback --------- Co-authored-by: Jake Fink <jfink@bitwarden.com>
This commit is contained in:
@@ -314,12 +314,18 @@ export class TokenService implements TokenServiceAbstraction {
|
||||
);
|
||||
}
|
||||
|
||||
const decryptedAccessToken = await this.encryptService.decryptString(
|
||||
encryptedAccessToken,
|
||||
accessTokenKey,
|
||||
);
|
||||
try {
|
||||
const decryptedAccessToken = await this.encryptService.decryptString(
|
||||
encryptedAccessToken,
|
||||
accessTokenKey,
|
||||
);
|
||||
return decryptedAccessToken;
|
||||
} catch (e) {
|
||||
// Note: This should be replaced by the owning team with appropriate, domain-specific behavior.
|
||||
|
||||
return decryptedAccessToken;
|
||||
this.logService.error("[TokenService] Error decrypting access token", e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user