Skip to content

Commit c2e2cb4

Browse files
committed
refactor(content_management): replace errorMessage with exception
- Changed `errorMessage` to `exception` in `EditSourceState`. - Updated `exception` type to `HtHttpException`. - Improved error handling and reporting.
1 parent 60654ef commit c2e2cb4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/content_management/bloc/edit_source/edit_source_state.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ final class EditSourceState extends Equatable {
3131
this.headquarters,
3232
this.countries = const [],
3333
this.contentStatus = ContentStatus.active,
34-
this.errorMessage,
34+
this.exception,
3535
this.updatedSource,
3636
});
3737

@@ -45,7 +45,7 @@ final class EditSourceState extends Equatable {
4545
final Country? headquarters;
4646
final List<Country> countries;
4747
final ContentStatus contentStatus;
48-
final String? errorMessage;
48+
final HtHttpException? exception;
4949
final Source? updatedSource;
5050

5151
/// Returns true if the form is valid and can be submitted.
@@ -68,7 +68,7 @@ final class EditSourceState extends Equatable {
6868
ValueGetter<Country?>? headquarters,
6969
List<Country>? countries,
7070
ContentStatus? contentStatus,
71-
String? errorMessage,
71+
HtHttpException? exception,
7272
Source? updatedSource,
7373
}) {
7474
return EditSourceState(
@@ -82,7 +82,7 @@ final class EditSourceState extends Equatable {
8282
headquarters: headquarters != null ? headquarters() : this.headquarters,
8383
countries: countries ?? this.countries,
8484
contentStatus: contentStatus ?? this.contentStatus,
85-
errorMessage: errorMessage,
85+
exception: exception,
8686
updatedSource: updatedSource ?? this.updatedSource,
8787
);
8888
}
@@ -99,7 +99,7 @@ final class EditSourceState extends Equatable {
9999
headquarters,
100100
countries,
101101
contentStatus,
102-
errorMessage,
102+
exception,
103103
updatedSource,
104104
];
105105
}

0 commit comments

Comments
 (0)