guix-commits
[Top][All Lists]
Advanced

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

01/03: http-client: Improve error reporting.


From: Ludovic Courtès
Subject: 01/03: http-client: Improve error reporting.
Date: Tue, 10 Jan 2017 14:57:42 +0000 (UTC)

civodul pushed a commit to branch master
in repository guix.

commit dd1141eba2cd92cde0fb7c4dc736fac533886a8d
Author: Ludovic Courtès <address@hidden>
Date:   Tue Jan 10 15:34:11 2017 +0100

    http-client: Improve error reporting.
    
    * guix/http-client.scm (http-fetch): Change message in &message
    condition to include URI, CODE, and the reason phrase.
---
 guix/http-client.scm |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/guix/http-client.scm b/guix/http-client.scm
index cc3acc9..0090783 100644
--- a/guix/http-client.scm
+++ b/guix/http-client.scm
@@ -276,7 +276,12 @@ Raise an '&http-get-error' condition if downloading fails."
                               (code code)
                               (reason (response-reason-phrase resp)))
                              (&message
-                              (message "download failed"))))))))))
+                              (message
+                               (format
+                                #f
+                                (_ "~a: HTTP download failed: ~a (~s)")
+                                (uri->string uri) code
+                                (response-reason-phrase resp))))))))))))
 
 
 ;;;



reply via email to

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