diff options
author | Christopher Baines <mail@cbaines.net> | 2022-11-19 14:55:46 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2022-11-19 14:55:46 +0000 |
commit | 4fa18d6e7bc5c648bd743ae7eb5c5b3739b66901 (patch) | |
tree | 74a2ec0496161b5e3ee582ba5c4692627d06fde1 /guix-qa-frontpage/server.scm | |
parent | 1d65e75e933ec38ad53906ab5790b0415515d2e1 (diff) | |
download | qa-frontpage-4fa18d6e7bc5c648bd743ae7eb5c5b3739b66901.tar qa-frontpage-4fa18d6e7bc5c648bd743ae7eb5c5b3739b66901.tar.gz |
Improve the derivation changes error handling
Diffstat (limited to 'guix-qa-frontpage/server.scm')
-rw-r--r-- | guix-qa-frontpage/server.scm | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/guix-qa-frontpage/server.scm b/guix-qa-frontpage/server.scm index d3978f8..c564ed6 100644 --- a/guix-qa-frontpage/server.scm +++ b/guix-qa-frontpage/server.scm @@ -434,16 +434,18 @@ port. Also, the port used can be changed by passing the --port option.\n" (let ((derivation-changes (with-exception-handler (lambda (exn) - (unless (and (guix-data-service-error? exn) - ;; This probably just means the target - ;; revision hasn't been processed yet. The - ;; Guix Data Service should send a more - ;; informative response though. - (string=? - (assoc-ref - (guix-data-service-error-response-body exn) - "error") - "invalid query")) + (unless + (and (guix-data-service-error? exn) + ;; This probably just means the target + ;; revision hasn't been processed yet. The + ;; Guix Data Service should send a more + ;; informative response though. + (and=> (assoc-ref + (guix-data-service-error-response-body exn) + "error") + (lambda (error) + (string=? error + "invalid query")))) (simple-format (current-error-port) "failed fetching derivation changes for issue ~A: ~A\n" |