guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: http: Handle error on /download.


From: Mathieu Othacehe
Subject: branch master updated: http: Handle error on /download.
Date: Tue, 28 Jul 2020 12:15:24 -0400

This is an automated email from the git hooks/post-receive script.

mothacehe pushed a commit to branch master
in repository guix-cuirass.

The following commit(s) were added to refs/heads/master by this push:
     new e413273  http: Handle error on /download.
e413273 is described below

commit e41327350d5408eec3186cd3bbcbff94b5037640
Author: Mathieu Othacehe <othacehe@gnu.org>
AuthorDate: Tue Jul 28 18:14:08 2020 +0200

    http: Handle error on /download.
    
    * src/cuirass/http.scm (url-handler): Handle the error case on /download
    route.
---
 src/cuirass/http.scm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]