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:
@@ -34,7 +34,7 @@ class RecordVoiceRecorder implements VoiceRecorder {
|
||||
throw StateError(L10n.current.homeRecorderPluginUnavailable);
|
||||
}
|
||||
if (!hasPermission) {
|
||||
_logger.warning(message: 'Voice recorder permission denied');
|
||||
_logger.debug(message: 'Voice recorder permission denied');
|
||||
throw StateError(L10n.current.homeRecorderPermissionDenied);
|
||||
}
|
||||
|
||||
@@ -51,7 +51,6 @@ class RecordVoiceRecorder implements VoiceRecorder {
|
||||
),
|
||||
path: path,
|
||||
);
|
||||
_logger.info(message: 'Voice recording started', extra: {'path': path});
|
||||
} on MissingPluginException catch (e, stackTrace) {
|
||||
_logger.error(
|
||||
message: 'Failed to start voice recording',
|
||||
@@ -67,10 +66,6 @@ class RecordVoiceRecorder implements VoiceRecorder {
|
||||
String? stoppedPath;
|
||||
try {
|
||||
stoppedPath = await _recorder.stop();
|
||||
_logger.info(
|
||||
message: 'Voice recording stopped',
|
||||
extra: {'path': stoppedPath ?? _currentPath},
|
||||
);
|
||||
} on MissingPluginException catch (e, stackTrace) {
|
||||
_logger.error(
|
||||
message: 'Failed to stop voice recording',
|
||||
|
||||
Reference in New Issue
Block a user