From c28b00425635fa2150035a13dd4d4be4eaf4db00 Mon Sep 17 00:00:00 2001 From: Daira Hopwood Date: Tue, 29 Mar 2022 16:48:56 +0100 Subject: [PATCH] qa/zcash/updatecheck.py: print status code and response of failed http requests. Signed-off-by: Daira Hopwood --- qa/zcash/updatecheck.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qa/zcash/updatecheck.py b/qa/zcash/updatecheck.py index 311fc0994..62f73c36f 100755 --- a/qa/zcash/updatecheck.py +++ b/qa/zcash/updatecheck.py @@ -199,6 +199,8 @@ class GithubTagReleaseLister: url = "https://api.github.com/repos/" + safe(self.org) + "/" + safe(self.repo) + "/git/refs/tags" r = requests.get(url, auth=requests.auth.HTTPBasicAuth(self.token.user(), self.token.password())) if r.status_code != 200: + print("API request failed (error %d)" % (r.status_code,), file=sys.stderr) + print(r.text, file=sys.stderr) raise RuntimeError("Request to GitHub tag API failed.") json = r.json() return list(map(lambda t: t["ref"].split("/")[-1], json)) @@ -208,6 +210,8 @@ class BerkeleyDbReleaseLister: url = "https://www.oracle.com/database/technologies/related/berkeleydb-downloads.html" r = requests.get(url) if r.status_code != 200: + print("API request failed (error %d)" % (r.status_code,), file=sys.stderr) + print(r.text, file=sys.stderr) raise RuntimeError("Request to Berkeley DB download directory failed.") page = r.text