2.1.1.4 VerifySpeed Error
VerifySpeed Errors
This document describes the error handling system used in the VerifySpeed Flutter integration.
VerifySpeedError
VerifySpeedError
is a class that represents errors that can occur during the verification process. It contains a message and an error type.
Properties
message
(String?
): A human-readable description of the errortype
(VerifySpeedErrorType
): The specific type of error that occurred
VerifySpeedErrorType
An enumeration of all possible error types that can occur during the verification process.
Available Error Types
Error Type | Description |
---|---|
client | An error occurred on the client side |
server | An error occurred on the server side |
verificationFailed | The verification process failed |
appNotInstalled | The required application is not installed |
clientKeyNotSet | The client key has not been set |
notFoundVerificationMethod | No suitable verification method was found |
invalidDeepLink | The deep link provided is invalid |
invalidPhoneNumber | The provided phone number is invalid |
activeSessionNotFound | No active verification session was found |
unknown | An unknown or unspecified error occurred |
Error Handling Example
await deepLinkProcessor.verifyPhoneNumberWithDeepLink(
...,
onFailure: (error) {
switch (error.type) {
case VerifySpeedErrorType.verificationFailed:
print('Please try again');
break;
case VerifySpeedErrorType.appNotInstalled:
print('Please install the app and try again');
case VerifySpeedErrorType.invalidPhoneNumber:
print('Please enter a valid phone number');
break;
default:
}
},
);