diff options
author | reAsOn2010 <the.reason.sake@gmail.com> | 2015-06-09 04:20:16 +0800 |
---|---|---|
committer | reAsOn2010 <the.reason.sake@gmail.com> | 2015-06-09 04:20:16 +0800 |
commit | 945fc048a8cc61e1a9390bd7a7fed371d2e23277 (patch) | |
tree | 4d5f584f1d33f89aaa119ad20418b5a91c5ecc55 /kafka/common.py | |
parent | b1aad92a2e7dfded5f57ebc497dccc5ad3c56781 (diff) | |
download | kafka-python-945fc048a8cc61e1a9390bd7a7fed371d2e23277.tar.gz |
try to fix uncaught FailedPayloadsError
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) |