refactor: Remove generic try-catch blocks and add explicit API error handling in activity places service.
All checks were successful
Deploy Flutter to Firebase (Mac) / deploy-android (push) Successful in 3m41s

This commit is contained in:
Van Leemput Dayron
2025-12-30 16:05:04 +01:00
parent bb5a89a06d
commit 5a682bb6d7
3 changed files with 240 additions and 256 deletions

View File

@@ -174,7 +174,11 @@ class ActivityBloc extends Bloc<ActivityEvent, ActivityState> {
'Erreur recherche activités: $e',
stackTrace,
);
emit(const ActivityError('Impossible de rechercher les activités'));
// Extraire le message d'erreur si disponible
final errorMessage = e.toString().replaceAll('Exception: ', '');
emit(
ActivityError('Impossible de rechercher les activités: $errorMessage'),
);
}
}