diff options
author | Mathieu Othacehe <othacehe@gnu.org> | 2020-08-02 18:34:19 +0200 |
---|---|---|
committer | Mathieu Othacehe <othacehe@gnu.org> | 2020-08-02 18:34:19 +0200 |
commit | 59c974134f569e476c4b4b17c1b8bce74746c546 (patch) | |
tree | 39a7343c70ec7a3bb2775105c8909f89ec8fd1a5 | |
parent | ce89a40ed8e8c32cd080e642c715591bb891474a (diff) | |
download | cuirass-59c974134f569e476c4b4b17c1b8bce74746c546.tar cuirass-59c974134f569e476c4b4b17c1b8bce74746c546.tar.gz |
http: Handle wrong build number on log route.
* src/cuirass/http.scm (url-handler): Handle erroneous id -> number conversion
on "/build/id/log/raw" route.
-rw-r--r-- | src/cuirass/http.scm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cuirass/http.scm b/src/cuirass/http.scm index 4c1d954..6f9eca5 100644 --- a/src/cuirass/http.scm +++ b/src/cuirass/http.scm @@ -374,7 +374,8 @@ Hydra format." (#:link . ,(string-append "/jobset/" (assq-ref build #:specification))))))) (respond-build-not-found build-id)))) (('GET "build" build-id "log" "raw") - (let ((build (db-get-build (string->number build-id)))) + (let* ((id (string->number build-id)) + (build (and id (db-get-build id)))) (if build (match (assq-ref build #:outputs) (((_ (#:path . (? string? output))) _ ...) |