about summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2026-02-06 17:03:59 -0600
committerFrederick Muriuki Muriithi2026-02-06 17:03:59 -0600
commit7fb012a4d8aa2f8d1564ed127930502b10d3e8e7 (patch)
tree54cb81e21244f30d628df8674bb66c8a0d05a89f /scripts
parentb5a2b5607f92973060a2af1555bfe0ffa280945f (diff)
downloadgn-uploader-7fb012a4d8aa2f8d1564ed127930502b10d3e8e7.tar.gz
Print out the correct error message.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/phenotypes/delete_phenotypes.py8
1 files changed, 8 insertions, 0 deletions
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)