From 1f95e47b99a3e0fad1b80f8d49454d2b113e58d8 Mon Sep 17 00:00:00 2001 From: Simon K <6615834+simon-20@users.noreply.github.com> Date: Fri, 27 Sep 2024 14:52:08 +0100 Subject: [PATCH] feat: structured error messages for HEAD reqs --- src/bulk_data_service/dataset_updater.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/bulk_data_service/dataset_updater.py b/src/bulk_data_service/dataset_updater.py index 56dd26d..ce76cbd 100644 --- a/src/bulk_data_service/dataset_updater.py +++ b/src/bulk_data_service/dataset_updater.py @@ -213,9 +213,8 @@ def check_dataset_etag_last_mod_header( "but HEAD request to check ETag/Last-Modified " "return non-200 status. {} " "HEAD request exception details: {}".format(download_within_hours, extra_err_message, e) - ), - "message": "{}".format(e), - } + ) + } | e.args[0] ) context["logger"].warning("dataset id: {} - {}".format(bds_dataset["id"], bds_dataset["head_error_message"]))