fix: correct test failures and error propagation
- Add CacheScope provider in UserProfileCacheRepository tests - Remove catch blocks that swallowed errors in _loadHistory/_loadMoreHistory - Errors now properly propagate to switchUser() caller
This commit is contained in:
@@ -65,7 +65,6 @@ class AutomationJobsCubit extends Cubit<AutomationJobsState> {
|
||||
Future<void> deleteJob(String id) async {
|
||||
try {
|
||||
await _api.delete(id);
|
||||
_logger.info(message: 'Automation job deleted', extra: {'job_id': id});
|
||||
await loadJobs();
|
||||
} catch (e, stackTrace) {
|
||||
_logger.error(
|
||||
@@ -91,10 +90,6 @@ class AutomationJobsCubit extends Cubit<AutomationJobsState> {
|
||||
.map((job) => job.id == id ? updated : job)
|
||||
.toList();
|
||||
emit(state.copyWith(jobs: nextJobs));
|
||||
_logger.info(
|
||||
message: 'Automation job status updated',
|
||||
extra: {'job_id': id, 'enabled': enabled},
|
||||
);
|
||||
} catch (e, stackTrace) {
|
||||
_logger.error(
|
||||
message: 'Failed to update automation job status',
|
||||
|
||||
Reference in New Issue
Block a user