fix: честные ошибки при вводе пароля и дубликат в Keychain
This commit is contained in:
@@ -290,6 +290,12 @@ class WrongDeviceTokenException implements Exception {
|
||||
String toString() => 'WrongDeviceTokenException';
|
||||
}
|
||||
|
||||
class WrongPasswordException implements Exception {
|
||||
const WrongPasswordException();
|
||||
@override
|
||||
String toString() => 'WrongPasswordException';
|
||||
}
|
||||
|
||||
class RequestCodeResult {
|
||||
final String token;
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ class TwoFactorModule extends AccountApiBase {
|
||||
checkPacketError(packet, 'check2faPassword');
|
||||
final data = packet.payload;
|
||||
if (data is Map && data['error'] != null) {
|
||||
throw Exception('Неверный пароль');
|
||||
throw const WrongPasswordException();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user