From 9732ed1670ef0739956900df37c0c77699628ec7 Mon Sep 17 00:00:00 2001 From: Mark Roberts Date: Tue, 25 Feb 2014 01:06:17 -0800 Subject: Minor refactor in conn.py, update version in __init__.py, add ErrorString --- kafka/client.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'kafka/client.py') diff --git a/kafka/client.py b/kafka/client.py index 155f658..9578ee8 100644 --- a/kafka/client.py +++ b/kafka/client.py @@ -5,7 +5,7 @@ from collections import defaultdict from functools import partial from itertools import count -from kafka.common import (ErrorMapping, TopicAndPartition, +from kafka.common import (ErrorMapping, ErrorStrings, TopicAndPartition, ConnectionError, FailedPayloadsError, BrokerResponseError, PartitionUnavailableError, KafkaUnavailableError, KafkaRequestError) @@ -174,8 +174,8 @@ class KafkaClient(object): self.reset_topic_metadata(resp.topic) raise BrokerResponseError( - "Request for %s failed with errorcode=%d" % - (TopicAndPartition(resp.topic, resp.partition), resp.error)) + "Request for %s failed with errorcode=%d (%s)" % + (TopicAndPartition(resp.topic, resp.partition), resp.error, ErrorStrings[resp.error])) ################# # Public API # -- cgit v1.2.1