From b91001514125994f15b79a42137ac5a063d13987 Mon Sep 17 00:00:00 2001 From: Maria Ines Parnisari Date: Mon, 9 Feb 2026 12:18:25 -0300 Subject: [PATCH] feat: more logging in Watch --- internal/commands/watch.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/internal/commands/watch.go b/internal/commands/watch.go index ea5697f6..0ee27524 100644 --- a/internal/commands/watch.go +++ b/internal/commands/watch.go @@ -33,7 +33,7 @@ func RegisterWatchCmd(rootCmd *cobra.Command) *cobra.Command { Short: "Watches the stream of relationship updates and schema updates from the server", Args: ValidationWrapper(cobra.RangeArgs(0, 2)), RunE: watchCmdFunc, - Deprecated: "please use `zed relationships watch` instead", + Deprecated: "please use `zed relationship watch` instead", } rootCmd.AddCommand(watchCmd) @@ -119,16 +119,17 @@ func watchCmdFuncImpl(cmd *cobra.Command, watchClient v1.WatchServiceClient, pro default: resp, err := watchStream.Recv() if err != nil { + log.Debug().Err(err).Msg("error receiving from Watch stream") ok, err := isRetryable(err) if !ok { return err } - log.Trace().Err(err).Msg("will retry from the last known revision " + watchRevision) + log.Debug().Err(err).Msg("will retry from the last known revision " + watchRevision) req.OptionalStartCursor = &v1.ZedToken{Token: watchRevision} watchStream, err = watchClient.Watch(ctx, req) if err != nil { - return err + return fmt.Errorf("error retrying the Watch call: %w", err) } continue }