From 4be609eb8291efc608aa18ed0bf3b2ef48f760e9 Mon Sep 17 00:00:00 2001 From: Remco Verhoef Date: Fri, 5 May 2017 18:49:08 -0700 Subject: [PATCH] Added AllAccessDisabled error --- cmd/api-errors.go | 2 ++ cmd/object-api-errors.go | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/cmd/api-errors.go b/cmd/api-errors.go index 4a10bbdb5..c56a103c4 100644 --- a/cmd/api-errors.go +++ b/cmd/api-errors.go @@ -663,6 +663,8 @@ func toAPIErrorCode(err error) (apiErr APIErrorCode) { apiErr = ErrStorageFull case BadDigest: apiErr = ErrBadDigest + case AllAccessDisabled: + apiErr = ErrAllAccessDisabled case IncompleteBody: apiErr = ErrIncompleteBody case ObjectExistsAsDirectory: diff --git a/cmd/object-api-errors.go b/cmd/object-api-errors.go index d77d85470..70c7619ab 100644 --- a/cmd/object-api-errors.go +++ b/cmd/object-api-errors.go @@ -250,6 +250,14 @@ func (e ObjectNameInvalid) Error() string { return "Object name invalid: " + e.Bucket + "#" + e.Object } +// AllAccessDisabled All access to this object has been disabled +type AllAccessDisabled GenericError + +// Return string an error formatted as the given text. +func (e AllAccessDisabled) Error() string { + return "All access to this object has been disabled" +} + // IncompleteBody You did not provide the number of bytes specified by the Content-Length HTTP header. type IncompleteBody GenericError