diff options
author | Mathieu Othacehe <othacehe@gnu.org> | 2020-07-28 18:14:08 +0200 |
---|---|---|
committer | Mathieu Othacehe <othacehe@gnu.org> | 2020-07-28 18:14:08 +0200 |
commit | e41327350d5408eec3186cd3bbcbff94b5037640 (patch) | |
tree | 57036df16a763941f932b1e074fdec75ecc55e16 | |
parent | f71f026a41d8e68e4a7f11ef6e708964594a599c (diff) | |
download | cuirass-e41327350d5408eec3186cd3bbcbff94b5037640.tar cuirass-e41327350d5408eec3186cd3bbcbff94b5037640.tar.gz |
http: Handle error on /download.
* src/cuirass/http.scm (url-handler): Handle the error case on /download
route.
-rw-r--r-- | src/cuirass/http.scm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cuirass/http.scm b/src/cuirass/http.scm index 36143b4..e7f0da7 100644 --- a/src/cuirass/http.scm +++ b/src/cuirass/http.scm @@ -581,7 +581,11 @@ Hydra format." (('GET "download" id) (let ((path (db-get-build-product-path id))) - (respond-file path))) + (if path + (respond-file path) + (respond-json-with-error + 500 + "Could not find the request build product.")))) (('GET "static" path ...) (respond-static-file path)) |