Skip to main content
Version: 5.0

DeviceError

An error that can be thrown in the Device class.

Usage


_14
try {
_14
await Device.showBiometricPrompt(promptConfig);
_14
} catch(e) {
_14
switch (e.code) {
_14
case DeviceErrorCodes.AuthFailed:
_14
alert('You failed to authenticate!');
_14
break;
_14
case DeviceErrorCodes.UserCanceledInteraction:
_14
alert('You cancelled the face id prompt!');
_14
break;
_14
default:
_14
throw e;
_14
}
_14
}

Properties

code

The error code enum representing the error.

message

  • Type: string

A text description of the error that occurred.