forked from TrueCloudLab/frostfs-s3-gw
[#316] Return badrequest err if couldnt parse body
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
This commit is contained in:
parent
3307953a4c
commit
e5a256df0c
3 changed files with 4 additions and 4 deletions
|
@ -106,7 +106,7 @@ func (h *handler) DeleteMultipleObjectsHandler(w http.ResponseWriter, r *http.Re
|
|||
// Unmarshal list of keys to be deleted.
|
||||
requested := &DeleteObjectsRequest{}
|
||||
if err := xml.NewDecoder(r.Body).Decode(requested); err != nil {
|
||||
h.logAndSendError(w, "couldn't decode body", reqInfo, err)
|
||||
h.logAndSendError(w, "couldn't decode body", reqInfo, errors.GetAPIError(errors.ErrMalformedXML))
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue