This commit is contained in:
MBucari 2023-03-25 16:33:00 -06:00
parent fc6f494f0d
commit 397a516dc1
11 changed files with 60 additions and 10 deletions

View file

@ -37,6 +37,12 @@ namespace LibationWinForms.Dialogs.Login
Email = accountId;
Password = this.passwordTb.Text;
if (string.IsNullOrWhiteSpace(Password))
{
MessageBox.Show("Please enter your password");
return;
}
Serilog.Log.Logger.Information("Submit button clicked: {@DebugInfo}", new { email = Email?.ToMask(), passwordLength = Password.Length });
LoginMethod = AudibleApi.LoginMethod.Api;

View file

@ -25,7 +25,7 @@ namespace LibationWinForms.Login
{
using var dialog = new LoginChoiceEagerDialog(_account);
if (!ShowDialog(dialog))
if (!ShowDialog(dialog) || string.IsNullOrWhiteSpace(dialog.Password))
return null;
switch (dialog.LoginMethod)

View file

@ -38,7 +38,11 @@ namespace LibationWinForms
else
await importAsync();
}
catch (Exception ex)
catch (OperationCanceledException)
{
Serilog.Log.Information("Audible login attempt cancelled by user");
}
catch (Exception ex)
{
Serilog.Log.Logger.Error(ex, "Error invoking auto-scan");
}

View file

@ -80,6 +80,10 @@ namespace LibationWinForms
if (Configuration.Instance.ShowImportedStats && newAdded > 0)
MessageBox.Show($"Total processed: {totalProcessed}\r\nNew: {newAdded}");
}
catch (OperationCanceledException)
{
Serilog.Log.Information("Audible login attempt cancelled by user");
}
catch (Exception ex)
{
MessageBoxLib.ShowAdminAlert(

View file

@ -288,6 +288,10 @@ namespace LibationWinForms.GridView
productsGrid_RemovableCountChanged(this, null);
}
catch (OperationCanceledException)
{
Serilog.Log.Information("Audible login attempt cancelled by user");
}
catch (Exception ex)
{
MessageBoxLib.ShowAdminAlert(