[#125] Updated error handling

Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
Denis Kirillov 2021-07-09 11:57:44 +03:00
parent e11b1b76ba
commit e78543adf3
4 changed files with 13 additions and 13 deletions

View file

@ -100,6 +100,7 @@ func (h *handler) CreateBucketHandler(w http.ResponseWriter, r *http.Request) {
Description: err.Error(),
HTTPStatusCode: http.StatusBadRequest,
}, r.URL)
return
}
p.Policy, err = policy.Parse(defaultPolicy)
@ -113,6 +114,7 @@ func (h *handler) CreateBucketHandler(w http.ResponseWriter, r *http.Request) {
Description: err.Error(),
HTTPStatusCode: http.StatusBadRequest,
}, r.URL)
return
}
cid, err := h.obj.CreateBucket(r.Context(), &p)