Skip to content

Commit

Permalink
Better logging on completion errors
Browse files Browse the repository at this point in the history
Co-authored-by: Didier Roche <[email protected]>
  • Loading branch information
jibel and didrocks committed Oct 26, 2023
1 parent e593fed commit 7f6d7cb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/adsysd/client/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ func (a *App) installDoc() {
defer client.Close()
stream, err := client.ListDoc(a.ctx, &adsys.Empty{})
if err != nil {
log.Errorf(context.Background(), "could not connect to adsysd: %v", err)
return nil, cobra.ShellCompDirectiveNoFileComp
}
r, err := stream.Recv()
if err != nil {
log.Warningf(context.Background(), "could not receive shell completion message: %v", err)
log.Errorf(context.Background(), "could not receive shell completion message: %v", err)
return nil, cobra.ShellCompDirectiveNoFileComp
}
return r.GetChapters(), cobra.ShellCompDirectiveNoFileComp
Expand Down

0 comments on commit 7f6d7cb

Please sign in to comment.