Skip to content

Commit

Permalink
fixed issue with err definition
Browse files Browse the repository at this point in the history
Signed-off-by: Magnus Kaiser <magnus.kaiser@gec.io>
  • Loading branch information
Magnus Kaiser committed Apr 12, 2022
1 parent f053402 commit 3aea9b3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/receive/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ func (h *Handler) handleRequest(ctx context.Context, rep uint64, tenant string,
}

func (h *Handler) receiveHTTP(w http.ResponseWriter, r *http.Request) {
var err error
span, ctx := tracing.StartSpan(r.Context(), "receive_http")
defer span.Finish()

Expand Down Expand Up @@ -326,7 +327,7 @@ func (h *Handler) receiveHTTP(w http.ResponseWriter, r *http.Request) {
} else {
compressed.Grow(512)
}
_, err := io.Copy(&compressed, r.Body)
_, err = io.Copy(&compressed, r.Body)
if err != nil {
http.Error(w, errors.Wrap(err, "read compressed request body").Error(), http.StatusInternalServerError)
return
Expand Down

0 comments on commit 3aea9b3

Please sign in to comment.