From c156f7f9359970958880b6ccedf08a7c6d8a3f4e Mon Sep 17 00:00:00 2001 From: marcfong <17400057+marcfong@users.noreply.github.com> Date: Fri, 23 Aug 2019 16:01:20 +0800 Subject: [PATCH] Update handlers.go Changed httpError for failing to coplete order to "http.StatusBadRequest" --- src/frontend/handlers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend/handlers.go b/src/frontend/handlers.go index d7e8765..b7a4e14 100644 --- a/src/frontend/handlers.go +++ b/src/frontend/handlers.go @@ -286,7 +286,7 @@ func (fe *frontendServer) placeOrderHandler(w http.ResponseWriter, r *http.Reque Country: country}, }) if err != nil { - renderHTTPError(log, r, w, errors.Wrap(err, "failed to complete the order"), http.StatusInternalServerError) + renderHTTPError(log, r, w, errors.Wrap(err, "failed to complete the order"), http.StatusBadRequest) return } log.WithField("order", order.GetOrder().GetOrderId()).Info("order placed")