Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,7 @@ private void LoadLogsForResource(ConsoleLogsSubscription subscription)
await InvokeAsync(StateHasChanged);
}

var hasError = false;
try
{
lock (_updateLogsLock)
Expand Down Expand Up @@ -807,6 +808,7 @@ private void LoadLogsForResource(ConsoleLogsSubscription subscription)
// If the subscription is being canceled then error could be transient from cancellation. Ignore errors during cancellation.
if (!subscription.CancellationToken.IsCancellationRequested)
{
hasError = true;
Logger.LogError(ex, "Error watching logs for resource {ResourceName}.", subscription.Resource.Name);

// For single resource subscriptions or first subscription in "All" mode, update status
Expand All @@ -824,7 +826,8 @@ private void LoadLogsForResource(ConsoleLogsSubscription subscription)

// If the subscription is being canceled then a new one could be starting.
// Don't set the status when finishing because overwrite the status from the new subscription.
if (!subscription.CancellationToken.IsCancellationRequested && !_isSubscribedToAll)
// Also don't overwrite error status if an error occurred.
if (!subscription.CancellationToken.IsCancellationRequested && !_isSubscribedToAll && !hasError)
{
SetStatus(PageViewModel, nameof(Dashboard.Resources.ConsoleLogs.ConsoleLogsFinishedWatchingLogs));
await InvokeAsync(StateHasChanged);
Expand Down