catch (Exception ex) when (ex is not NavigationException){ Logger.LogError(ex, "Login failure"); ErrorMessage = "Something went wrong";}
catch (NavigationException){ throw;}
Regex.Replace(url, "[^A-Z0-9]", match => Replacements.GetValueOrDefault(match.Value) ?? match.Value)