mirror of
https://github.com/minio/minio.git
synced 2025-01-26 22:23:15 -05:00
Add code to translate errInvalidEncryptionParameters to APIErrcode (#6625)
Fixes #6623
This commit is contained in:
parent
b8bd8d6a03
commit
c7f180ffa9
@ -1441,6 +1441,8 @@ func toAPIErrorCode(err error) (apiErr APIErrorCode) {
|
|||||||
case auth.ErrInvalidSecretKeyLength:
|
case auth.ErrInvalidSecretKeyLength:
|
||||||
apiErr = ErrAdminInvalidSecretKey
|
apiErr = ErrAdminInvalidSecretKey
|
||||||
// SSE errors
|
// SSE errors
|
||||||
|
case errInvalidEncryptionParameters:
|
||||||
|
apiErr = ErrInvalidEncryptionParameters
|
||||||
case crypto.ErrInvalidEncryptionMethod:
|
case crypto.ErrInvalidEncryptionMethod:
|
||||||
apiErr = ErrInvalidEncryptionMethod
|
apiErr = ErrInvalidEncryptionMethod
|
||||||
case errInsecureSSERequest:
|
case errInsecureSSERequest:
|
||||||
|
@ -570,7 +570,7 @@ func (api objectAPIHandlers) HeadObjectHandler(w http.ResponseWriter, r *http.Re
|
|||||||
|
|
||||||
// Set standard object headers.
|
// Set standard object headers.
|
||||||
if hErr := setObjectHeaders(w, objInfo, rs); hErr != nil {
|
if hErr := setObjectHeaders(w, objInfo, rs); hErr != nil {
|
||||||
writeErrorResponse(w, toAPIErrorCode(hErr), r.URL)
|
writeErrorResponseHeadersOnly(w, toAPIErrorCode(hErr))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user