Merge pull request #178 from KirillovDenis/bugfix/118-correct_not_found

[#118] Correct NotFound status
This commit is contained in:
Alex Vanin 2021-07-26 15:05:23 +03:00 committed by GitHub
commit 65cd1db56d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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)
}