Skip to content

Commit

Permalink
Merge pull request #299 from squat/correctstatuscode
Browse files Browse the repository at this point in the history
pkg/receive: return correct status code
  • Loading branch information
openshift-merge-robot committed Jan 22, 2020
2 parents 7d0245b + 9562123 commit f64b1ae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/receive/handler.go
Expand Up @@ -67,7 +67,8 @@ func (h *Handler) Receive(w http.ResponseWriter, r *http.Request) {
if resp.StatusCode/100 != 2 {
msg := "upstream response status is not 200 OK"
level.Error(h.logger).Log("msg", msg, "statuscode", resp.Status)
http.Error(w, msg, http.StatusBadGateway)
http.Error(w, msg, resp.StatusCode)
return
}
w.WriteHeader(resp.StatusCode)
}

0 comments on commit f64b1ae

Please sign in to comment.