From 85855a7ac45e9795eb6c22ab1897450d037d6d19 Mon Sep 17 00:00:00 2001 From: ErnestaP Date: Thu, 25 Jan 2024 11:28:50 +0100 Subject: [PATCH] common: create_or_update_article error details --- dags/common/utils.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dags/common/utils.py b/dags/common/utils.py index de04535c..b552b72c 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: + logger.error(response) + raise