2
0
Fork 0
mirror of git://git.savannah.gnu.org/guix/data-service.git synced 2023-12-14 03:23:03 +01:00

Add some catch all error handling to fetch-build-for-derivation

This commit is contained in:
Christopher Baines 2019-03-08 08:22:52 +00:00
parent 7a00bff2c3
commit 5bc0e7d4bf
No known key found for this signature in database
GPG key ID: 5E28A33B0B84F577

View file

@ -72,6 +72,9 @@
(select-derivations-with-no-known-build conn)))
(define (fetch-build-for-derivation url derivation-file-name)
(catch
#t
(lambda ()
(match (fetch-latest-builds-for-derivation url derivation-file-name)
((or #f #())
(match (fetch-queued-builds-for-derivation url derivation-file-name)
@ -84,6 +87,11 @@
status)))
(#(status)
status)))
(lambda args
(simple-format #t "\nerror: couldn't fetch build for ~A on ~A\n"
derivation-file-name url)
(simple-format #t "error: ~A\n" args)
#f)))
(define (json-string->scm* string)
(catch