Skip to content

Commit 7d565eb

Browse files
committed
fix(create_topic): improve error handling
- Replaced errorMessage with exception - Handle unexpected errors gracefully - Improved error message clarity
1 parent 8d69bb3 commit 7d565eb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/content_management/bloc/create_topic/create_topic_bloc.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,14 @@ class CreateTopicBloc extends Bloc<CreateTopicEvent, CreateTopicState> {
102102
emit(
103103
state.copyWith(
104104
status: CreateTopicStatus.failure,
105-
errorMessage: e.message,
105+
exception: e,
106106
),
107107
);
108108
} catch (e) {
109109
emit(
110110
state.copyWith(
111111
status: CreateTopicStatus.failure,
112-
errorMessage: e.toString(),
112+
exception: UnknownException('An unexpected error occurred: $e'),
113113
),
114114
);
115115
}

0 commit comments

Comments
 (0)