From a6bb08963395f0b2090ffab27f441722b97cf63b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bispo?= Date: Fri, 17 Mar 2023 15:07:41 +0000 Subject: [PATCH] [PM-1497] Known device api error (#2418) * [PM-1497] Ignore know device api error. --- src/App/Pages/Accounts/LoginPageViewModel.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/App/Pages/Accounts/LoginPageViewModel.cs b/src/App/Pages/Accounts/LoginPageViewModel.cs index 3622c0338..cebdffdb3 100644 --- a/src/App/Pages/Accounts/LoginPageViewModel.cs +++ b/src/App/Pages/Accounts/LoginPageViewModel.cs @@ -150,15 +150,21 @@ namespace Bit.App.Pages { 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)