mirror of https://github.com/minio/minio.git
Use toAPIErrorCode in HeadObject handler when decrypting request fails (#5600)
This commit is contained in:
parent
4e5237b02a
commit
5f37988db5
|
@ -253,7 +253,7 @@ func (api objectAPIHandlers) HeadObjectHandler(w http.ResponseWriter, r *http.Re
|
|||
return
|
||||
} else if encrypted {
|
||||
if _, err = DecryptRequest(w, r, objInfo.UserDefined); err != nil {
|
||||
writeErrorResponse(w, ErrSSEEncryptedObject, r.URL)
|
||||
writeErrorResponse(w, toAPIErrorCode(err), r.URL)
|
||||
return
|
||||
}
|
||||
w.Header().Set(SSECustomerAlgorithm, r.Header.Get(SSECustomerAlgorithm))
|
||||
|
|
Loading…
Reference in New Issue