Browse Source

client: don't abort creation on auth failure

The client can still be useful for some tasks even if it can't maintain a
complete list of topics due to e.g. Kafka 0.10's new ACLs.

Fixes #722.
Evan Huus 9 years ago
parent
commit
f4a626377c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      client.go

+ 1 - 1
client.go

@@ -138,7 +138,7 @@ func NewClient(addrs []string, conf *Config) (Client, error) {
 	switch err {
 	case nil:
 		break
-	case ErrLeaderNotAvailable, ErrReplicaNotAvailable:
+	case ErrLeaderNotAvailable, ErrReplicaNotAvailable, ErrTopicAuthorizationFailed, ErrClusterAuthorizationFailed:
 		// indicates that maybe part of the cluster is down, but is not fatal to creating the client
 		Logger.Println(err)
 	default: