[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Ludovic Courtès |
Date: |
Wed, 24 Jan 2018 08:10:19 -0500 (EST) |
branch: master
commit 74f3abfba38c7a4f4131eb1b3351b65192fecade
Author: Ludovic Courtès <address@hidden>
Date: Wed Jan 24 13:59:28 2018 +0100
http: /build: Gracefully handle empty output list.
* src/cuirass/http.scm (url-handler): Add case for empty #:outputs.
---
src/cuirass/http.scm | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/cuirass/http.scm b/src/cuirass/http.scm
index 0417ffb..2f25e0f 100644
--- a/src/cuirass/http.scm
+++ b/src/cuirass/http.scm
@@ -141,6 +141,11 @@
(respond (build-response #:code 302
#:headers `((location . ,uri)))
#:body "")))
+ (()
+ ;; Not entry for BUILD-ID in the 'Outputs' table.
+ (respond-json-with-error
+ 500
+ (format #f "Outputs of build ~a are unknown." build-id)))
(#f
(respond-build-not-found build-id)))
(respond-build-not-found build-id))))