Version: 5.0
DeviceError
An error that can be thrown in the Device class.
Usage
try {
await Device.showBiometricPrompt(promptConfig);
} catch(e) {
switch (e.code) {
case DeviceErrorCodes.AuthFailed:
alert('You failed to authenticate!');
break;
case DeviceErrorCodes.UserCanceledInteraction:
alert('You cancelled the face id prompt!');
break;
default:
throw e;
}
}
Properties
code
- Type: DeviceErrorCodes
The error code enum representing the error.
message
- Type:
string
A text description of the error that occurred.