diff options
-rw-r--r-- | guix-qa-frontpage/guix-data-service.scm | 6 | ||||
-rw-r--r-- | guix-qa-frontpage/server.scm | 20 |
2 files changed, 20 insertions, 6 deletions
diff --git a/guix-qa-frontpage/guix-data-service.scm b/guix-qa-frontpage/guix-data-service.scm index c697fef..9674b18 100644 --- a/guix-qa-frontpage/guix-data-service.scm +++ b/guix-qa-frontpage/guix-data-service.scm @@ -69,7 +69,11 @@ 404) (values #f #f) (let ((json-body - (json-string->scm (utf8->string body)))) + (with-exception-handler + (lambda _ #f) + (lambda () + (json-string->scm (utf8->string body))) + #:unwind? #t))) (if (or (> (response-code response) 400) (assoc-ref json-body "error")) diff --git a/guix-qa-frontpage/server.scm b/guix-qa-frontpage/server.scm index 2f725bb..15dc3db 100644 --- a/guix-qa-frontpage/server.scm +++ b/guix-qa-frontpage/server.scm @@ -434,11 +434,21 @@ port. Also, the port used can be changed by passing the --port option.\n" (let ((derivation-changes (with-exception-handler (lambda (exn) - (simple-format - (current-error-port) - "failed fetching derivation changes for issue ~A: ~A\n" - (car series) - 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")) + (simple-format + (current-error-port) + "failed fetching derivation changes for issue ~A: ~A\n" + (car series) + exn)) #f) (lambda () |