diff --git a/src/KubernetesClient/GenericClient.cs b/src/KubernetesClient/GenericClient.cs index 2ccb7cc8..a250aad2 100644 --- a/src/KubernetesClient/GenericClient.cs +++ b/src/KubernetesClient/GenericClient.cs @@ -116,14 +116,14 @@ public async Task ReplaceNamespacedAsync(T obj, string ns, string name, Ca where T : IKubernetesObject { var respTask = kubernetes.CustomObjects.ListClusterCustomObjectWithHttpMessagesAsync(group, version, plural, watch: true, cancellationToken: cancel); - return respTask.WatchAsync(); + return respTask.WatchAsync(onError, cancel); } public IAsyncEnumerable<(WatchEventType, T)> WatchNamespacedAsync(string ns, Action onError = null, CancellationToken cancel = default) where T : IKubernetesObject { var respTask = kubernetes.CustomObjects.ListNamespacedCustomObjectWithHttpMessagesAsync(group, version, ns, plural, watch: true, cancellationToken: cancel); - return respTask.WatchAsync(); + return respTask.WatchAsync(onError, cancel); } public Watcher Watch(Action onEvent, Action onError = null, Action onClosed = null)