swarm/api/http: add error pages (#14967)

This commit is contained in:
holisticode
2017-09-08 13:29:09 -05:00
committed by Felix Lange
parent 5ba9225fe3
commit ac193e36ce
6 changed files with 662 additions and 20 deletions

View File

@ -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
}