aboutsummaryrefslogtreecommitdiff
path: root/guix-qa-frontpage
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2022-11-19 14:39:55 +0000
committerChristopher Baines <mail@cbaines.net>2022-11-19 14:39:55 +0000
commit23157de83d10607dd43a661292f9d0205934c750 (patch)
tree2a7a0856d526bdbf7470779afb29b3a41865224b /guix-qa-frontpage
parent35064e35db1333da93eef4d9f43cb213755a351b (diff)
downloadqa-frontpage-23157de83d10607dd43a661292f9d0205934c750.tar
qa-frontpage-23157de83d10607dd43a661292f9d0205934c750.tar.gz
Remove some noise from querying derivation changes
Diffstat (limited to 'guix-qa-frontpage')
-rw-r--r--guix-qa-frontpage/guix-data-service.scm6
-rw-r--r--guix-qa-frontpage/server.scm20
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 ()