fix(claude-do): snake_case Serilog tokens + no Warning-log on cancelled hub calls

Message-template tokens must be snake_case (repo rule) -- fixes 4 PascalCase
tokens introduced in 57dd6766. TryInvokeAsync's swallowing catch also no
longer logs a Warning for OperationCanceledException, which is routine
(e.g. worker shutdown/reconnect), not a failure worth a trace.

ClaudeDo-Task: d2ae3831-733f-4d40-93d7-70c93da11590
This commit is contained in:
Mika Kuns
2026-09-28 13:32:38 +02:00
parent 57dd676672
commit 3009ff0f8f
4 changed files with 9 additions and 8 deletions
+5 -4
View File
@@ -304,11 +304,12 @@ public partial class WorkerClient : ObservableObject, IAsyncDisposable, IWorkerC
ok = true;
return result;
}
catch (Exception ex)
catch (Exception ex) when (ex is not OperationCanceledException)
{
Serilog.Log.Warning(ex, "Hub call {Method} failed", method);
Serilog.Log.Warning(ex, "Hub call {method_name} failed", method);
return default;
}
catch { return default; }
finally { OperationTiming.Shared.Record("hub", method, sw.Elapsed, ok); }
}
@@ -324,7 +325,7 @@ public partial class WorkerClient : ObservableObject, IAsyncDisposable, IWorkerC
}
catch (Exception ex)
{
Serilog.Log.Warning(ex, "Hub call {Method} failed", method);
Serilog.Log.Warning(ex, "Hub call {method_name} failed", method);
throw;
}
finally { OperationTiming.Shared.Record("hub", method, sw.Elapsed, ok); }
@@ -343,7 +344,7 @@ public partial class WorkerClient : ObservableObject, IAsyncDisposable, IWorkerC
}
catch (Exception ex)
{
Serilog.Log.Warning(ex, "Hub call {Method} failed", method);
Serilog.Log.Warning(ex, "Hub call {method_name} failed", method);
throw;
}
finally { OperationTiming.Shared.Record("hub", method, sw.Elapsed, ok); }
@@ -209,7 +209,7 @@ public sealed partial class IslandsShellViewModel : ViewModelBase, IDisposable
private void FlashFooter(string message, WorkerLogLevel level)
{
if (level == WorkerLogLevel.Error)
Serilog.Log.Warning("Footer error: {Message}", message);
Serilog.Log.Warning("Footer error: {message}", message);
WorkerLogText = $"{DateTime.Now:HH:mm} · {message}";
WorkerLogLevel = level;