Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions kafka/consumer/fetcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -593,11 +593,7 @@ async def _send_list_offsets_request(self, node_id, timestamps_and_epochs):
)

log.debug("Sending ListOffsetRequest %s to broker %s", request, node_id)
try:
response = await self._manager.send(request, node_id=node_id)
except Errors.IncompatibleBrokerVersion as exc:
# TODO: push this down to connection or bvd
raise Errors.UnsupportedVersionError(exc.args[0]) from None
response = await self._manager.send(request, node_id=node_id)
return self._handle_list_offsets_response(response)

def _handle_list_offsets_response(self, response):
Expand Down
8 changes: 4 additions & 4 deletions kafka/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ class IllegalStateError(KafkaError):
pass


class IncompatibleBrokerVersion(KafkaError):
pass


class KafkaConfigurationError(KafkaError):
pass

Expand Down Expand Up @@ -404,6 +400,10 @@ class UnsupportedVersionError(BrokerResponseError):
description = 'The version of API is not supported.'


class IncompatibleBrokerVersion(UnsupportedVersionError):
"""Synthetic error raised by client"""


class TopicAlreadyExistsError(BrokerResponseError):
errno = 36
message = 'TOPIC_ALREADY_EXISTS'
Expand Down
Loading