More logging

This commit is contained in:
Watchful1 2025-03-09 11:34:38 -07:00
parent 15d574e198
commit 3c97f8ffcb
2 changed files with 4 additions and 2 deletions

View file

@ -133,7 +133,8 @@ def query_reddit(ids, reddit, object_type):
try:
response = reddit.request(method="GET", path=endpoints.API_PATH["info"], params={"id": id_string})
break
except (prawcore.exceptions.ServerError, prawcore.exceptions.RequestException):
except (prawcore.exceptions.ServerError, prawcore.exceptions.RequestException) as err:
log.info(f"No response from reddit api: {err} : {id_string}")
time.sleep(2)
return response['data']['children']