This commit is contained in:
mohammad
2024-09-04 16:55:46 +03:00
parent c4fc274dbf
commit c9160debd3
8 changed files with 81 additions and 64 deletions

View File

@ -39,13 +39,17 @@ class AuthenticationAPI {
expectedResponseModel: (json) {
return json['data']['cooldown'];
});
return response;
} on DioException catch (e) {
final errorData = e.response!.data;
String errorMessage = errorData['message'];
print('sendOtp=$errorMessage');
if (e.response != null) {
if (e.response!.statusCode == 400) {
final errorData = e.response!.data;
String errorMessage = errorData['message'];
print('sendOtp=$errorMessage');
if (errorMessage == 'User not found') {
return 1;
} else {