serve restic: add more info to GET request error

This commit is contained in:
Nick Craig-Wood 2018-03-14 21:09:12 +00:00
parent 677971643c
commit 7ccc6080b0

View file

@ -293,9 +293,9 @@ func (s *server) getObject(w http.ResponseWriter, r *http.Request, remote string
w.WriteHeader(code)
_, err = io.Copy(w, file)
n, err := io.Copy(w, file)
if err != nil {
fs.Errorf(remote, "Didn't finish writing GET request: %v", err)
fs.Errorf(remote, "Didn't finish writing GET request (wrote %d/%d bytes): %v", n, size, err)
return
}
}