Skip to content

Commit 53840cf

Browse files
committed
fix(createHeadlineBloc): improve error handling
- Replaced errorMessage with exception property. - Handle unexpected errors gracefully. - Improved error reporting clarity.
1 parent 92e0bf0 commit 53840cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/content_management/bloc/create_headline/create_headline_bloc.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,14 @@ class CreateHeadlineBloc
7070
emit(
7171
state.copyWith(
7272
status: CreateHeadlineStatus.failure,
73-
errorMessage: e.message,
73+
exception: e,
7474
),
7575
);
7676
} catch (e) {
7777
emit(
7878
state.copyWith(
7979
status: CreateHeadlineStatus.failure,
80-
errorMessage: e.toString(),
80+
exception: UnknownException('An unexpected error occurred: $e'),
8181
),
8282
);
8383
}

0 commit comments

Comments
 (0)