Refactoring - Version stable

This commit is contained in:
dahoud
2026-03-28 14:35:32 +00:00
parent d0e61ead97
commit 95d0e4502e
5 changed files with 141 additions and 17 deletions

View File

@@ -64,6 +64,9 @@ class DashboardRemoteDataSourceImpl implements DashboardRemoteDataSource {
throw ServerException('Failed to load member dashboard: ${response.statusCode}');
}
} on DioException catch (e) {
if (e.response?.statusCode == 404) {
throw const NotFoundException('Profil membre non trouvé');
}
AppLogger.error('DashboardRemoteDataSource: getMemberDashboardData', error: e);
throw ServerException('Network error: ${e.message}');
} catch (e, st) {
@@ -102,6 +105,9 @@ class DashboardRemoteDataSourceImpl implements DashboardRemoteDataSource {
throw ServerException('Failed to load adherent account: ${response.statusCode}');
}
} on DioException catch (e) {
if (e.response?.statusCode == 404) {
throw const NotFoundException('Compte adhérent non trouvé');
}
AppLogger.error('DashboardRemoteDataSource: getCompteAdherent', error: e);
throw ServerException('Network error: ${e.message}');
} catch (e, st) {