The error type is taken from the native module, but OndatoError.unexpectedInternalError always comes. Even when the user clicks the cancel button at the very beginning of verification or if he does not agree with the terms of use.
When the user interrupts the process at the beginning - refusing to start verification, the error OndatoError.cancelled should be returned.
the file ondato_config.dart has a list of errors that can be intercepted, but the default case is always returned.
OndatoException(this.identificationId, error) {
switch (error) {
case 'cancelled':
this.error = OndatoError.cancelled;
break;
case 'invalidServerResponse':
this.error = OndatoError.invalidServerResponse;
break;
case 'invalidCredentials':
this.error = OndatoError.invalidCredentials;
break;
default:
this.error = OndatoError.unexpectedInternalError;
}
}
This problem has been dragging on for a long time, and I hoped that it would be fixed. But there are no fixes in the latest 2.5.2 update.
The problem leads to the fact that after completing the verification process, I cannot understand what went wrong - if the user received an error or simply interrupted the process on his own initiative. Depending on the error, I could help the user resume the verification process.
The error type is taken from the native module, but
OndatoError.unexpectedInternalError
always comes. Even when the user clicks the cancel button at the very beginning of verification or if he does not agree with the terms of use. When the user interrupts the process at the beginning - refusing to start verification, the errorOndatoError.cancelled
should be returned. the fileondato_config.dart
has a list of errors that can be intercepted, but the default case is always returned.This problem has been dragging on for a long time, and I hoped that it would be fixed. But there are no fixes in the latest 2.5.2 update.
The problem leads to the fact that after completing the verification process, I cannot understand what went wrong - if the user received an error or simply interrupted the process on his own initiative. Depending on the error, I could help the user resume the verification process.