diff --git a/karapace/kafka_rest_apis/consumer_manager.py b/karapace/kafka_rest_apis/consumer_manager.py index 3a248bc66..8aaf4e396 100644 --- a/karapace/kafka_rest_apis/consumer_manager.py +++ b/karapace/kafka_rest_apis/consumer_manager.py @@ -480,7 +480,6 @@ async def fetch(self, internal_name: Tuple[str, str], content_type: str, formats continue if val <= 0: KarapaceBase.internal_error(message=f"Invalid request parameter {val}", content_type=content_type) - response = [] LOG.info( "Will poll multiple times for a single message with a total timeout of %dms, " "until at least %d bytes have been fetched", @@ -535,6 +534,7 @@ async def fetch(self, internal_name: Tuple[str, str], content_type: str, formats read_bytes, time.monotonic() - start_time, ) + response = [] for msg in poll_data: try: key = await self.deserialize(msg.key(), request_format) if msg.key() else None