Skip to content

Commit

Permalink
Make error handling code shorter
Browse files Browse the repository at this point in the history
Co-authored-by: Bartlomiej Plotka <[email protected]>
  • Loading branch information
douglascamata and bwplotka authored Jun 21, 2022
1 parent 643ffb9 commit d267f27
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/receive/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,7 @@ func (h *Handler) receiveHTTP(w http.ResponseWriter, r *http.Request) {
}

responseStatusCode := http.StatusOK
err = h.handleRequest(ctx, rep, tenant, &wreq)
if err != nil {
if err = h.handleRequest(ctx, rep, tenant, &wreq); err != nil {
level.Debug(tLogger).Log("msg", "failed to handle request", "err", err)
switch determineWriteErrorCause(err, 1) {
case errNotReady:
Expand Down

0 comments on commit d267f27

Please sign in to comment.