mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-25 12:15:18 +01:00
Handle error object for biometric lock (#9070)
This commit is contained in:
parent
7bb37877ee
commit
ea7d1ff6ed
@ -143,15 +143,17 @@ export class LockComponent extends BaseLockComponent {
|
|||||||
try {
|
try {
|
||||||
success = await super.unlockBiometric();
|
success = await super.unlockBiometric();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
const error = BiometricErrors[e as BiometricErrorTypes];
|
const error = BiometricErrors[e?.message as BiometricErrorTypes];
|
||||||
|
|
||||||
if (error == null) {
|
if (error == null) {
|
||||||
this.logService.error("Unknown error: " + e);
|
this.logService.error("Unknown error: " + e);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.biometricError = this.i18nService.t(error.description);
|
this.biometricError = this.i18nService.t(error.description);
|
||||||
|
} finally {
|
||||||
|
this.pendingBiometric = false;
|
||||||
}
|
}
|
||||||
this.pendingBiometric = false;
|
|
||||||
|
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user