From f01328229062eaed4977f74c9c0ac402bcf206ca Mon Sep 17 00:00:00 2001 From: Denis Kirillov Date: Mon, 22 Aug 2022 14:42:54 +0300 Subject: [PATCH] [#660] Fix panic on invalid versioning status Signed-off-by: Denis Kirillov --- api/handler/versioning.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/handler/versioning.go b/api/handler/versioning.go index f67a784f7..e4da70390 100644 --- a/api/handler/versioning.go +++ b/api/handler/versioning.go @@ -34,7 +34,7 @@ func (h *handler) PutBucketVersioningHandler(w http.ResponseWriter, r *http.Requ } if configuration.Status != data.VersioningEnabled && configuration.Status != data.VersioningSuspended { - h.logAndSendError(w, "invalid versioning configuration", reqInfo, err) + h.logAndSendError(w, "invalid versioning configuration", reqInfo, errors.GetAPIError(errors.ErrMalformedXML)) return } settings.Versioning = configuration.Status