Skip to content

Commit

Permalink
fix: correct the buggy fix in 710f46c
Browse files Browse the repository at this point in the history
  • Loading branch information
engineervix committed Jan 15, 2024
1 parent 8e8c52c commit 64be24d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/core/news/znbc.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,13 @@ def get_news():
return latest_news[::-1]
except requests.exceptions.ConnectionError as conn_err:
logger.exception(f"Connection error occurred for {url}\n: {conn_err}")
return []
except requests.exceptions.HTTPError as http_err:
logger.exception(f"HTTP error occurred for {url}\n: {http_err}")
return []
except requests.exceptions.RequestException as req_err:
logger.exception(f"Request error occurred for {url}\n: {req_err}")
return []
except Exception as err:
logger.exception(f"An unexpected error occurred for {url}\n: {err}")
return []
return []

0 comments on commit 64be24d

Please sign in to comment.