web/rpc: Merge ports with API server.

Fixes #1081 and #1130
This commit is contained in:
Harshavardhana
2016-02-16 18:50:36 -08:00
parent 5a9333a67b
commit dd9aaa855c
12 changed files with 323 additions and 179 deletions

View File

@@ -75,6 +75,7 @@ const (
BucketNotEmpty
RootPathFull
ObjectExistsAsPrefix
AllAccessDisabled
)
// APIError code to Error structure map
@@ -244,6 +245,11 @@ var errorCodeResponse = map[int]APIError{
Description: "An object already exists as your prefix, choose a different prefix to proceed.",
HTTPStatusCode: http.StatusConflict,
},
AllAccessDisabled: {
Code: "AllAccessDisabled",
Description: "All access to this bucket has been disabled.",
HTTPStatusCode: http.StatusForbidden,
},
}
// errorCodeError provides errorCode to Error. It returns empty if the code provided is unknown