fix: Prefer reusing AppBaseException instead of redefining the exception contract CacheException and RemoteException
This commit is contained in:
+1
-1
@@ -40,7 +40,7 @@ class GetEmailChangesToRemoveNotificationInteractor {
|
||||
propertiesUpdated: propertiesUpdated);
|
||||
yield Right<Failure, Success>(GetEmailChangesToRemoveNotificationSuccess(session.username, emailIds));
|
||||
} else {
|
||||
yield Left<Failure, Success>(GetEmailChangesToRemoveNotificationFailure(NotFoundEmailStateException()));
|
||||
yield Left<Failure, Success>(GetEmailChangesToRemoveNotificationFailure(const NotFoundEmailStateException()));
|
||||
}
|
||||
} catch (e) {
|
||||
yield Left<Failure, Success>(GetEmailChangesToRemoveNotificationFailure(e));
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ class GetNewReceiveEmailFromNotificationInteractor {
|
||||
log('GetNewReceiveEmailFromNotificationInteractor::execute: listEmailIds = $listEmailIds');
|
||||
yield Right<Failure, Success>(GetNewReceiveEmailFromNotificationSuccess(accountId, session, listEmailIds));
|
||||
} else {
|
||||
yield Left<Failure, Success>(GetNewReceiveEmailFromNotificationFailure(EmailStateNoChangeException()));
|
||||
yield Left<Failure, Success>(GetNewReceiveEmailFromNotificationFailure(const EmailStateNoChangeException()));
|
||||
}
|
||||
} catch (e) {
|
||||
yield Left<Failure, Success>(GetNewReceiveEmailFromNotificationFailure(e));
|
||||
|
||||
Reference in New Issue
Block a user