mirror of
https://github.com/minio/minio.git
synced 2025-11-20 18:06:10 -05:00
api: Sent ErrPreconditionFailed on If-Match failure (#2009)
* api: Sent ErrPreconditionFailed on If-Match failure ref: http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ErrorCodeList * tests: Added functional tests for GetObject w/ If-Match headers set * tests: Used verifyError to simplify errorCode and description matching on error
This commit is contained in:
committed by
Harshavardhana
parent
76f6533f8d
commit
a854e8cc5c
@@ -74,6 +74,7 @@ const (
|
||||
ErrNoSuchKey
|
||||
ErrNoSuchUpload
|
||||
ErrNotImplemented
|
||||
ErrPreconditionFailed
|
||||
ErrRequestTimeTooSkewed
|
||||
ErrSignatureDoesNotMatch
|
||||
ErrMethodNotAllowed
|
||||
@@ -255,6 +256,11 @@ var errorCodeResponse = map[APIErrorCode]APIError{
|
||||
Description: "A header you provided implies functionality that is not implemented.",
|
||||
HTTPStatusCode: http.StatusNotImplemented,
|
||||
},
|
||||
ErrPreconditionFailed: {
|
||||
Code: "PreconditionFailed",
|
||||
Description: "At least one of the preconditions you specified did not hold.",
|
||||
HTTPStatusCode: http.StatusPreconditionFailed,
|
||||
},
|
||||
ErrRequestTimeTooSkewed: {
|
||||
Code: "RequestTimeTooSkewed",
|
||||
Description: "The difference between the request time and the server's time is too large.",
|
||||
|
||||
Reference in New Issue
Block a user