http-client: Improve error reporting.

* guix/http-client.scm (http-fetch): Change message in &message
condition to include URI, CODE, and the reason phrase.
This commit is contained in:
Ludovic Courtès 2017-01-10 15:34:11 +01:00
parent b1a505baf6
commit dd1141eba2
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 6 additions and 1 deletions

View File

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