satellite/admin: Fix response code for Get bucket
Get bucket was returning a "bad request" HTTP status code when the bucket doesn't exists. We have to return HTTP "Not found" status code. Change-Id: If717d99276b02a1e59a9b71ebc909bd6d8d9390b
This commit is contained in:
parent
60444d145c
commit
d17b41d027
@ -116,7 +116,7 @@ func (server *Server) getBucketInfo(w http.ResponseWriter, r *http.Request) {
|
||||
b, err := server.buckets.GetBucket(ctx, bucket, project.UUID)
|
||||
if err != nil {
|
||||
if storj.ErrBucketNotFound.Has(err) {
|
||||
sendJSONError(w, "bucket does not exist", "", http.StatusBadRequest)
|
||||
sendJSONError(w, "bucket does not exist", "", http.StatusNotFound)
|
||||
} else {
|
||||
sendJSONError(w, "unable to check bucket", err.Error(), http.StatusInternalServerError)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user