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
|
@ -612,7 +612,7 @@ func parseLocationConstraint(r *http.Request) (*createBucketParams, error) {
|
|||
|
||||
params := new(createBucketParams)
|
||||
if err := xml.NewDecoder(r.Body).Decode(params); err != nil {
|
||||
return nil, err
|
||||
return nil, errors.GetAPIError(errors.ErrMalformedXML)
|
||||
}
|
||||
return params, nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue