From 7fb012a4d8aa2f8d1564ed127930502b10d3e8e7 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Fri, 6 Feb 2026 17:03:59 -0600 Subject: Print out the correct error message. --- scripts/phenotypes/delete_phenotypes.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'scripts') diff --git a/scripts/phenotypes/delete_phenotypes.py b/scripts/phenotypes/delete_phenotypes.py index 692dc59..461f3ec 100644 --- a/scripts/phenotypes/delete_phenotypes.py +++ b/scripts/phenotypes/delete_phenotypes.py @@ -157,6 +157,14 @@ if __name__ == "__main__": "and also specify to 'DELETE-ALL' phenotypes in the " "population, we have no way of knowing what it is you want.") return 1 + except requests.exceptions.HTTPError as _exc: + resp = _exc.response + resp_data = resp.json() + logger.debug("%s: %s", + resp_data["error"], + resp_data["error_description"], + exc_info=True) + return 1 except Exception as _exc:# pylint: disable=[broad-exception-caught] logger.debug("Failed while attempting to delete phenotypes.", exc_info=True) -- cgit 1.4.1