diff options
Diffstat (limited to 'kafka/common.py')
-rw-r--r-- | kafka/common.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kafka/common.py b/kafka/common.py index 2fdf7d2..66987ff 100644 --- a/kafka/common.py +++ b/kafka/common.py @@ -226,6 +226,8 @@ kafka_errors = dict([(x.errno, x) for x in _iter_broker_errors()]) def check_error(response): + if isinstance(response, Exception): + raise response if response.error: error_class = kafka_errors.get(response.error, UnknownError) raise error_class(response) |