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:
qzl
2026-04-01 15:11:49 +08:00
parent 640b4d15a3
commit 19aa33a609
9 changed files with 7 additions and 48 deletions
@@ -117,10 +117,6 @@ class FriendRepositoryImpl extends CachedRepository<List<FriendUser>>
}
final request = FriendRequest.fromJson(data);
await _invalidateFriendCaches(friendshipId);
_logger.info(
message: 'Friend request accepted',
extra: {'friendship_id': friendshipId},
);
return request;
} catch (e, stackTrace) {
_logger.error(
@@ -145,10 +141,6 @@ class FriendRepositoryImpl extends CachedRepository<List<FriendUser>>
}
final request = FriendRequest.fromJson(data);
await _invalidateFriendCaches(friendshipId);
_logger.info(
message: 'Friend request declined',
extra: {'friendship_id': friendshipId},
);
return request;
} catch (e, stackTrace) {
_logger.error(