diff options
author | Christopher Baines <mail@cbaines.net> | 2022-09-21 13:00:44 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2022-09-21 13:00:44 +0100 |
commit | a19c52d6456aa796e9d908232290f1ee5f256b62 (patch) | |
tree | d57eee54da9141b3679d0fa19fc1b19c2242b131 /guix-qa-frontpage/mumi.scm | |
parent | f06cb444085b54abd598d6fa7622643796ea1bf7 (diff) | |
download | qa-frontpage-a19c52d6456aa796e9d908232290f1ee5f256b62.tar qa-frontpage-a19c52d6456aa796e9d908232290f1ee5f256b62.tar.gz |
Handle when issues.guix.gnu.org is down
Diffstat (limited to 'guix-qa-frontpage/mumi.scm')
-rw-r--r-- | guix-qa-frontpage/mumi.scm | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/guix-qa-frontpage/mumi.scm b/guix-qa-frontpage/mumi.scm index 31f98ff..82614aa 100644 --- a/guix-qa-frontpage/mumi.scm +++ b/guix-qa-frontpage/mumi.scm @@ -22,10 +22,19 @@ #:export (mumi-issue-tags)) (define (mumi-issue-tags number) - (let ((response - (graphql-http-get "https://issues.guix.gnu.org/graphql" - `(document (query (#(issue #:number ,number) tags)))))) - (peek "RESPONSE" response) - (vector->list - (assoc-ref (cdr (first response)) - "tags")))) + (with-exception-handler + (lambda (exn) + (simple-format + (current-error-port) + "exception when fetching issue tags: ~A\n" + exn) + #f) + (lambda () + (let ((response + (graphql-http-get "https://issues.guix.gnu.org/graphql" + `(document (query (#(issue #:number ,number) tags)))))) + (peek "RESPONSE" response) + (vector->list + (assoc-ref (cdr (first response)) + "tags")))) + #:unwind? #t)) |