Skip to content

Commit

Permalink
[PM-1497] Known device api error (#2418)
Browse files Browse the repository at this point in the history
* [PM-1497] Ignore know device api error.
  • Loading branch information
andrebispo5 committed Mar 17, 2023
1 parent 4ed5980 commit e23ab78
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/App/Pages/Accounts/LoginPageViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,15 +150,21 @@ public async Task InitAsync()
{
Email = await _stateService.GetRememberedEmailAsync();
}
var deviceIdentifier = await _appIdService.GetAppIdAsync();
IsKnownDevice = await _apiService.GetKnownDeviceAsync(Email, deviceIdentifier);
CanRemoveAccount = await _stateService.GetActiveUserEmailAsync() != Email;
await _deviceActionService.HideLoadingAsync();
IsKnownDevice = await _apiService.GetKnownDeviceAsync(Email, await _appIdService.GetAppIdAsync());
}
catch (ApiException apiEx) when (apiEx.Error.StatusCode == System.Net.HttpStatusCode.Unauthorized)
{
_logger.Exception(apiEx);
}
catch (Exception ex)
{
HandleException(ex);
}
finally
{
await _deviceActionService.HideLoadingAsync();
}
}

public async Task LogInAsync(bool showLoading = true, bool checkForExistingAccount = false)
Expand Down

0 comments on commit e23ab78

Please sign in to comment.