[#118] Correct NotFound status

Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
Denis Kirillov 2021-07-26 14:03:26 +03:00
parent f4cd1e4c38
commit 2479650739

View file

@ -182,9 +182,5 @@ func writeError(w http.ResponseWriter, r *http.Request, log *zap.Logger, msg, ri
zap.String("object_name", obj),
zap.Error(err))
api.WriteErrorResponse(r.Context(), w, api.Error{
Code: api.GetAPIError(api.ErrInternalError).Code,
Description: err.Error(),
HTTPStatusCode: http.StatusInternalServerError,
}, r.URL)
api.WriteErrorResponse(r.Context(), w, err, r.URL)
}