From 41176853093e5a439ab441f3824551fabecb03b6 Mon Sep 17 00:00:00 2001 From: Dirk Wilden Date: Fri, 8 Mar 2024 10:33:42 +0100 Subject: [PATCH] degrade gracefully when get topics is called with restricted permissions (fixes #151) --- internal/topic/topic-operation.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/internal/topic/topic-operation.go b/internal/topic/topic-operation.go index e3e3294..c9bc897 100644 --- a/internal/topic/topic-operation.go +++ b/internal/topic/topic-operation.go @@ -623,10 +623,9 @@ func (operation *Operation) GetTopics(flags GetTopicsFlags) error { go func(topic string) { t, err := readTopic(&client, &admin, topic, requestedFields) if err != nil { - errChannel <- errors.Errorf("unable to read topic %s: %v", topic, err) - } else { - topicChannel <- t + output.Debugf("failed to read topic %q: %v", topic, err) } + topicChannel <- t }(topic) }