From f9e9edc2db546fe9555d5044af384b7bd655f474 Mon Sep 17 00:00:00 2001 From: Gordon Krieger Date: Wed, 17 Apr 2024 18:38:35 +0000 Subject: [PATCH] ignore dataset description if katsu down --- bento_beacon/utils/katsu_utils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bento_beacon/utils/katsu_utils.py b/bento_beacon/utils/katsu_utils.py index 656d1f23..341cc71a 100644 --- a/bento_beacon/utils/katsu_utils.py +++ b/bento_beacon/utils/katsu_utils.py @@ -239,7 +239,11 @@ def katsu_total_individuals_count(): def katsu_datasets(id=None): c = current_app.config endpoint = c["KATSU_DATASETS_ENDPOINT"] - response = katsu_get(endpoint, id, query="format=phenopackets") + try: + response = katsu_get(endpoint, id, query="format=phenopackets") + except APIException: + return {} + if "detail" in response and response["detail"] == "Not found.": return {}