Skip to content

Commit

Permalink
add log on error.
Browse files Browse the repository at this point in the history
  • Loading branch information
hoseinaghaei committed Feb 15, 2024
1 parent 2bc2687 commit 270f8c2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions kafka_server/broker/file/read.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@ 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:
print(response.json(), response.content, response.status_code)

return response.status_code == 200
except Exception as e:
print(e)
Expand Down

0 comments on commit 270f8c2

Please sign in to comment.