aboutsummaryrefslogtreecommitdiffstats
path: root/swarm/api/api.go
diff options
context:
space:
mode:
authorholisticode <holistic.computing@gmail.com>2017-09-09 02:29:09 +0800
committerFelix Lange <fjl@users.noreply.github.com>2017-09-09 02:29:09 +0800
commitac193e36ce4bce752717124433a8ce84c347dbf7 (patch)
treeaa94c7b2db1557d05db6bb8e83828749026255cf /swarm/api/api.go
parent5ba9225fe3b06d5512976b808bc87d92d03d54ba (diff)
downloaddexon-ac193e36ce4bce752717124433a8ce84c347dbf7.tar.gz
dexon-ac193e36ce4bce752717124433a8ce84c347dbf7.tar.zst
dexon-ac193e36ce4bce752717124433a8ce84c347dbf7.zip
swarm/api/http: add error pages (#14967)
Diffstat (limited to 'swarm/api/api.go')
-rw-r--r--swarm/api/api.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/swarm/api/api.go b/swarm/api/api.go
index 7d185ab3c..a5941fb5c 100644
--- a/swarm/api/api.go
+++ b/swarm/api/api.go
@@ -132,6 +132,7 @@ func (self *Api) Put(content, contentType string) (storage.Key, error) {
func (self *Api) Get(key storage.Key, path string) (reader storage.LazySectionReader, mimeType string, status int, err error) {
trie, err := loadManifest(self.dpa, key, nil)
if err != nil {
+ status = http.StatusNotFound
log.Warn(fmt.Sprintf("loadManifestTrie error: %v", err))
return
}