fix: avoid printing certain errors under few locations (#16631)

This commit is contained in:
Harshavardhana
2023-02-17 01:40:31 -08:00
committed by GitHub
parent a7188bc9d0
commit 6ea150fd68
5 changed files with 22 additions and 19 deletions

View File

@@ -86,7 +86,11 @@ func (api objectAPIHandlers) PutBucketPolicyHandler(w http.ResponseWriter, r *ht
bucketPolicy, err := policy.ParseConfig(bytes.NewReader(bucketPolicyBytes), bucket)
if err != nil {
writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
writeErrorResponse(ctx, w, APIError{
Code: "ErrMalformedXML",
HTTPStatusCode: http.StatusBadRequest,
Description: err.Error(),
}, r.URL)
return
}