diff --git a/dags/common/utils.py b/dags/common/utils.py index de04535c..b8b0c996 100644 --- a/dags/common/utils.py +++ b/dags/common/utils.py @@ -253,5 +253,9 @@ def create_or_update_article(data): data=json.dumps(data), headers=headers, ) - response.raise_for_status() - return response.json() + try: + response.raise_for_status() + return response.json() + except requests.HTTPError: + response.raise_for_status() + logger.error(response.data)