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 {
|
||||
success = await super.unlockBiometric();
|
||||
} catch (e) {
|
||||
const error = BiometricErrors[e as BiometricErrorTypes];
|
||||
const error = BiometricErrors[e?.message as BiometricErrorTypes];
|
||||
|
||||
if (error == null) {
|
||||
this.logService.error("Unknown error: " + e);
|
||||
return false;
|
||||
}
|
||||
|
||||
this.biometricError = this.i18nService.t(error.description);
|
||||
} finally {
|
||||
this.pendingBiometric = false;
|
||||
}
|
||||
this.pendingBiometric = false;
|
||||
|
||||
return success;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue