object: handle Error responses and handle errDiskFull. (#1331)

This commit is contained in:
Harshavardhana
2016-04-19 02:42:10 -07:00
committed by Anand Babu (AB) Periasamy
parent 6bc17a3aea
commit e0f8fed011
11 changed files with 77 additions and 202 deletions

View File

@@ -83,7 +83,7 @@ const (
ErrMalformedPOSTRequest
ErrSignatureVersionNotSupported
ErrBucketNotEmpty
ErrRootPathFull
ErrStorageFull
ErrObjectExistsAsPrefix
ErrAllAccessDisabled
ErrMalformedPolicy
@@ -295,9 +295,9 @@ var errorCodeResponse = map[APIErrorCode]APIError{
Description: "The bucket you tried to delete is not empty.",
HTTPStatusCode: http.StatusConflict,
},
ErrRootPathFull: {
Code: "RootPathFull",
Description: "Root path has reached its minimum free disk threshold. Please delete few objects to proceed.",
ErrStorageFull: {
Code: "StorageFull",
Description: "Storage backend has reached its minimum free disk threshold. Please delete few objects to proceed.",
HTTPStatusCode: http.StatusInternalServerError,
},
ErrObjectExistsAsPrefix: {