mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-08-25 16:19:40 +00:00
Fix error handling in DeleteSpaceBloc: update failure message to include exception details
This commit is contained in:
@ -16,7 +16,7 @@ class DeleteSpaceBloc extends Bloc<DeleteSpaceEvent, DeleteSpaceState> {
|
||||
|
||||
Future<void> _onDeleteSpace(
|
||||
DeleteSpace event,
|
||||
Emitter<DeleteSpaceState> emit
|
||||
Emitter<DeleteSpaceState> emit,
|
||||
) async {
|
||||
emit(DeleteSpaceLoading());
|
||||
try {
|
||||
@ -25,7 +25,7 @@ class DeleteSpaceBloc extends Bloc<DeleteSpaceEvent, DeleteSpaceState> {
|
||||
} on APIException catch (e) {
|
||||
emit(DeleteSpaceFailure(e.message));
|
||||
} catch (e) {
|
||||
emit(const DeleteSpaceFailure('Failed to delete space'));
|
||||
emit(DeleteSpaceFailure(e.toString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user