1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-16 08:13:20 +00:00

catch thrown sync errors from ui

This commit is contained in:
Kyle Spearrin
2019-10-15 11:05:56 -04:00
parent a0aca3e837
commit 37a536b138
4 changed files with 6700 additions and 6632 deletions

View File

@@ -71,7 +71,7 @@ namespace Bit.Core.Services
await _storageService.SaveAsync(string.Format(Keys_LastSyncFormat, userId), date);
}
public async Task<bool> FullSyncAsync(bool forceSync)
public async Task<bool> FullSyncAsync(bool forceSync, bool allowThrowOnError = false)
{
SyncStarted();
var isAuthenticated = await _userService.IsAuthenticatedAsync();
@@ -106,7 +106,14 @@ namespace Bit.Core.Services
}
catch
{
return SyncCompleted(false);
if(allowThrowOnError)
{
throw;
}
else
{
return SyncCompleted(false);
}
}
}