Add Beneficiary bugs fixed #2

This commit is contained in:
2025-09-05 18:15:19 +05:30
parent be9a6fc93f
commit 1204507375
3 changed files with 14 additions and 10 deletions

View File

@@ -1,5 +1,6 @@
import 'dart:developer';
import 'package:dio/dio.dart';
import 'package:kmobile/core/errors/exceptions.dart';
import 'package:kmobile/data/models/ifsc.dart';
import 'package:kmobile/data/models/beneficiary.dart';
@@ -40,8 +41,12 @@ class BeneficiaryService {
if (e.response?.statusCode == 404) {
throw Exception('INVALID IFSC CODE');
}
else if (e.response?.statusCode == 401) {
throw Exception('INVALID IFSC CODE');
}
} catch (e) {
rethrow;
throw UnexpectedException(
'Unexpected error during login: ${e.toString()}');
}
return Ifsc.fromJson({});
}
@@ -118,4 +123,4 @@ class BeneficiaryService {
throw Exception('Unexpected error: ${e.toString()}');
}
}
}
}