From 54f934a6825005f51d5d939fb626491264c2d895 Mon Sep 17 00:00:00 2001 From: TheJoKlLa Date: Thu, 28 Apr 2022 13:48:59 +0200 Subject: [PATCH] Fixed #56 --- .../PageModel/AddServerProcess/AuthPlainPageModel.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Borepin/Borepin/PageModel/AddServerProcess/AuthPlainPageModel.cs b/Borepin/Borepin/PageModel/AddServerProcess/AuthPlainPageModel.cs index 56c367f..656c023 100644 --- a/Borepin/Borepin/PageModel/AddServerProcess/AuthPlainPageModel.cs +++ b/Borepin/Borepin/PageModel/AddServerProcess/AuthPlainPageModel.cs @@ -5,6 +5,7 @@ using Borepin.Base; using Borepin.Model; using Borepin.Service.BFFH; using Borepin.Service.BFFH.Exceptions; +using FabAccessAPI.Exceptions; using Prism.Commands; using Prism.Navigation; using Prism.Services; @@ -85,13 +86,20 @@ namespace Borepin.PageModel.AddServerProcess IsBusy = false; return; } - catch (AuthenticatingFailedException) + catch (AuthenticationFailedException) { await _PageDialogService.DisplayAlertAsync("Connection failed", "Unable to authenticate to server.", "Ok").ConfigureAwait(false); IsBusy = false; return; } + catch(Exception) + { + await _PageDialogService.DisplayAlertAsync("Connection failed", "Unexpected Error.", "Ok").ConfigureAwait(false); + + IsBusy = false; + return; + } await _NavigationService.NavigateAsync("/MainPage/NavigationPage/MachineListPage").ConfigureAwait(false); }