mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-21 20:26:41 +00:00
Additional error handling.
This commit is contained in:
parent
b8bd17de28
commit
cd9c7bea60
1 changed files with 6 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue