Simple S3-like server for development purposes, written in Go
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix error with ls

+6 -1
+6 -1
server.go
··· 110 110 111 111 result, err := listObjects(root, bucketName, r.URL.Query().Get("prefix")) 112 112 if err != nil { 113 - http.Error(w, err.Error(), http.StatusInternalServerError) 113 + if errors.Is(err, fs.ErrNotExist) { 114 + http.Error(w, err.Error(), http.StatusNotFound) 115 + } else { 116 + http.Error(w, err.Error(), http.StatusInternalServerError) 117 + } 118 + return 114 119 } 115 120 116 121 w.Header().Set("Content-Type", "application/xml")