From cd9c7bea60197ed74b88c975b269681a929aac3c Mon Sep 17 00:00:00 2001 From: "Daniel A. Nagy" Date: Fri, 13 Feb 2015 13:29:46 +0100 Subject: [PATCH] Additional error handling. --- bzz/httpaccess.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bzz/httpaccess.go b/bzz/httpaccess.go index 9563713d7d..d5c3f8027d 100644 --- a/bzz/httpaccess.go +++ b/bzz/httpaccess.go @@ -136,7 +136,12 @@ func handler(w http.ResponseWriter, r *http.Request, dpa *DPA) { size, err := manifestReader.Read(manifest) if int64(size) < manifestReader.Size() { dpaLogger.Debugf("Swarm: Manifest %s not found.", name) - http.Error(w, err.Error(), http.StatusNotFound) + if err == nil { + http.Error(w, "Manifest retrieval cut short: "+string(size)+" "+string(manifestReader.Size()), + http.StatusNotFound) + } else { + http.Error(w, err.Error(), http.StatusNotFound) + } return } dpaLogger.Debugf("Swarm: Manifest %s retrieved.", name)