diff --git a/lib/kafkalib/errors.go b/lib/kafkalib/errors.go index 84563885..10d06771 100644 --- a/lib/kafkalib/errors.go +++ b/lib/kafkalib/errors.go @@ -1,7 +1,6 @@ package kafkalib import ( - "context" "errors" "log/slog" "strings" @@ -35,16 +34,5 @@ func isRetryableError(err error) bool { return false } - retryableErrs := []error{ - context.DeadlineExceeded, - kafka.TopicAuthorizationFailed, - } - - for _, retryableErr := range retryableErrs { - if errors.Is(err, retryableErr) { - return true - } - } - - return false + return errors.Is(err, kafka.TopicAuthorizationFailed) } diff --git a/lib/kafkalib/errors_test.go b/lib/kafkalib/errors_test.go index 79defa9a..c9291930 100644 --- a/lib/kafkalib/errors_test.go +++ b/lib/kafkalib/errors_test.go @@ -1,7 +1,6 @@ package kafkalib import ( - "context" "fmt" "testing" @@ -62,10 +61,6 @@ func TestIsRetryableError(t *testing.T) { err: kafka.TopicAuthorizationFailed, expected: true, }, - { - err: context.DeadlineExceeded, - expected: true, - }, { err: kafka.MessageSizeTooLarge, expected: false,