summaryrefslogtreecommitdiff
path: root/kafka/errors.py
diff options
context:
space:
mode:
authorTaras Voinarovskyi <voyn1991@gmail.com>2017-10-14 23:06:27 +0300
committerGitHub <noreply@github.com>2017-10-14 23:06:27 +0300
commitfbbd6ca5d999a8520d483ecfe0ad6f805eb8833f (patch)
tree52e5860b1f8738b15e7c757c205961b761badd2b /kafka/errors.py
parentdd8e33654f2270097d6c1373dc272153670e48f8 (diff)
parent365cae02da59721df77923bb5f5a2d94a84b2e83 (diff)
downloadkafka-python-fbbd6ca5d999a8520d483ecfe0ad6f805eb8833f.tar.gz
Merge pull request #1252 from dpkp/legacy_records_refactor
Refactor MessageSet and Message into LegacyRecordBatch
Diffstat (limited to 'kafka/errors.py')
-rw-r--r--kafka/errors.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/kafka/errors.py b/kafka/errors.py
index c72455a..4a409db 100644
--- a/kafka/errors.py
+++ b/kafka/errors.py
@@ -101,12 +101,15 @@ class OffsetOutOfRangeError(BrokerResponseError):
' maintained by the server for the given topic/partition.')
-class InvalidMessageError(BrokerResponseError):
+class CorruptRecordException(BrokerResponseError):
errno = 2
- message = 'INVALID_MESSAGE'
+ message = 'CORRUPT_MESSAGE'
description = ('This message has failed its CRC checksum, exceeds the'
' valid size, or is otherwise corrupt.')
+# Backward compatibility
+InvalidMessageError = CorruptRecordException
+
class UnknownTopicOrPartitionError(BrokerResponseError):
errno = 3