Add more context to rpc version mismatch errors (#8271)

Fixes #5665
This commit is contained in:
Praveen raj Mani
2019-10-03 12:38:12 +05:30
committed by Harshavardhana
parent 83066f953c
commit e48005ddc7
7 changed files with 36 additions and 4 deletions

View File

@@ -141,6 +141,7 @@ const (
ErrInvalidPrefixMarker
ErrBadRequest
ErrKeyTooLongError
ErrInvalidAPIVersion
// Add new error codes here.
// SSE-S3 related API errors
@@ -1502,6 +1503,11 @@ var errorCodes = errorCodeMap{
Description: "Invalid according to Policy: Policy Condition failed",
HTTPStatusCode: http.StatusForbidden,
},
ErrInvalidAPIVersion: {
Code: "ErrInvalidAPIVersion",
Description: "Invalid version found in the request",
HTTPStatusCode: http.StatusNotFound,
},
// Add your error structure here.
}