Skip to content

Commit 12ba1ad

Browse files
committed
refactor(content_management): replace errorMessage with exception
- Changed `errorMessage` to `exception` in `CreateTopicState`. - Updated `exception` type to `HtHttpException`. - Improved error handling and reporting.
1 parent 7d565eb commit 12ba1ad

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/content_management/bloc/create_topic/create_topic_state.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ final class CreateTopicState extends Equatable {
2424
this.description = '',
2525
this.iconUrl = '',
2626
this.contentStatus = ContentStatus.active,
27-
this.errorMessage,
27+
this.exception,
2828
this.createdTopic,
2929
});
3030

@@ -33,7 +33,7 @@ final class CreateTopicState extends Equatable {
3333
final String description;
3434
final String iconUrl;
3535
final ContentStatus contentStatus;
36-
final String? errorMessage;
36+
final HtHttpException? exception;
3737
final Topic? createdTopic;
3838

3939
/// Returns true if the form is valid and can be submitted.
@@ -47,7 +47,7 @@ final class CreateTopicState extends Equatable {
4747
String? description,
4848
String? iconUrl,
4949
ContentStatus? contentStatus,
50-
String? errorMessage,
50+
HtHttpException? exception,
5151
Topic? createdTopic,
5252
}) {
5353
return CreateTopicState(
@@ -56,7 +56,7 @@ final class CreateTopicState extends Equatable {
5656
description: description ?? this.description,
5757
iconUrl: iconUrl ?? this.iconUrl,
5858
contentStatus: contentStatus ?? this.contentStatus,
59-
errorMessage: errorMessage,
59+
exception: exception,
6060
createdTopic: createdTopic ?? this.createdTopic,
6161
);
6262
}
@@ -68,7 +68,7 @@ final class CreateTopicState extends Equatable {
6868
description,
6969
iconUrl,
7070
contentStatus,
71-
errorMessage,
71+
exception,
7272
createdTopic,
7373
];
7474
}

0 commit comments

Comments
 (0)