mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-12 23:37:15 +00:00
fix(preferences): improve error handling with Sieve server
This commit is contained in:
1 parent
9aeecead6c
commit
7180b5988d
5 files changed
+49
-29
No files matched your search
@@ -1613,6 +1613,7 @@ static NSArray *reminderValues = nil;
|
||||
|
||||
if ([[user userDefaults] synchronize])
|
||||
{
|
||||
NSException *error;
|
||||
SOGoMailAccount *account;
|
||||
SOGoMailAccounts *folder;
|
||||
SOGoDomainDefaults *dd;
|
||||
@@ -1628,10 +1629,10 @@ static NSArray *reminderValues = nil;
|
||||
inContext: context];
|
||||
account = [folder lookupName: @"0" inContext: context acquire: NO];
|
||||
|
||||
if (![account updateFiltersAndForceActivation: forceActivation])
|
||||
if ((error = [account updateFiltersAndForceActivation: forceActivation]))
|
||||
{
|
||||
results = (id <WOActionResults>) [self responseWithStatus: 502
|
||||
andJSONRepresentation: [NSDictionary dictionaryWithObjectsAndKeys: @"Connection error", @"message", nil]];
|
||||
results = (id <WOActionResults>) [self responseWithStatus: 500
|
||||
andJSONRepresentation: [NSDictionary dictionaryWithObjectsAndKeys: [error reason], @"message", nil]];
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user