Minio handle for list_objects_v2 with a blank ContinuationToken (#5940)

minio will now return an error for a blank continuation token in list_objects_v2,so as in s3.

Fixes #5931
This commit is contained in:
Praveen raj Mani
2018-06-26 01:05:43 +05:30
committed by kannappanr
parent 0bbdd02a57
commit 5fbdd70de9
4 changed files with 51 additions and 4 deletions

View File

@@ -193,6 +193,7 @@ const (
ErrHealMissingBucket
ErrHealAlreadyRunning
ErrHealOverlappingPaths
ErrIncorrectContinuationToken
)
// error code to APIError structure, these fields carry respective
@@ -842,7 +843,11 @@ var errorCodeResponse = map[APIErrorCode]APIError{
Description: "Object storage backend is unreachable",
HTTPStatusCode: http.StatusServiceUnavailable,
},
ErrIncorrectContinuationToken: {
Code: "InvalidArgument",
Description: "The continuation token provided is incorrect",
HTTPStatusCode: http.StatusBadRequest,
},
// Add your error structure here.
}