From 0c1421382b14ff963e4c0113854bfffffbb49125 Mon Sep 17 00:00:00 2001 From: hoseinaghaei Date: Thu, 15 Feb 2024 04:59:45 +0330 Subject: [PATCH] add log on error. --- kafka_server/broker/file/read.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kafka_server/broker/file/read.py b/kafka_server/broker/file/read.py index e782e22..f4e8d96 100644 --- a/kafka_server/broker/file/read.py +++ b/kafka_server/broker/file/read.py @@ -150,7 +150,7 @@ def send_to_subscriber(self, key: str, value: str) -> bool: try: response = requests.post(url, json={'key': key, 'value': value}, timeout=2) - if response != 200: + if response.status_code != 200: print(response.json(), response.content, response.status_code) return response.status_code == 200