Skip to content

Commit

Permalink
Log warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
LiamMorrow committed Sep 22, 2024
1 parent 6cb55cb commit bc25df4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion LiftLog.Ui/Store/Settings/SettingsEffects.cs
Original file line number Diff line number Diff line change
Expand Up @@ -253,18 +253,25 @@ public async Task ExecuteRemoteBackup(ExecuteRemoteBackupAction action, IDispatc
}
catch (HttpRequestException ex) when (ex.StatusCode is null)
{
logger.LogWarning(ex, "Failed to backup data to remote server [connection failure]");
dispatcher.Dispatch(
new ToastAction("Failed to backup data to remote server [connection failure]")
);
}
catch (HttpRequestException ex)
{
logger.LogWarning(
ex,
"Failed to backup data to remote server [{StatusCode}]",
ex.StatusCode
);
dispatcher.Dispatch(
new ToastAction("Failed to backup data to remote server [" + ex.StatusCode + "]")
);
}
catch
catch (Exception ex)
{
logger.LogWarning(ex, "Failed to backup data to remote server [unknown]");
dispatcher.Dispatch(
new ToastAction("Failed to backup data to remote server [unknown]")
);
Expand Down

0 comments on commit bc25df4

Please sign in to comment.