From 2479650739a28451cf507218ba734e1258ae3fde Mon Sep 17 00:00:00 2001 From: Denis Kirillov Date: Mon, 26 Jul 2021 14:03:26 +0300 Subject: [PATCH] [#118] Correct NotFound status Signed-off-by: Denis Kirillov --- api/handler/get.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/api/handler/get.go b/api/handler/get.go index 41b4b9673..26ea33042 100644 --- a/api/handler/get.go +++ b/api/handler/get.go @@ -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) }