frontend/handlers: wrap err

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
This commit is contained in:
Ahmet Alp Balkan 2018-06-28 16:54:24 -07:00
parent 92eb76c1db
commit 9728803877

View file

@ -73,7 +73,7 @@ func (fe *frontendServer) homeHandler(w http.ResponseWriter, r *http.Request) {
for i, p := range products { for i, p := range products {
price, err := fe.convertCurrency(r.Context(), p.GetPriceUsd(), currentCurrency(r)) price, err := fe.convertCurrency(r.Context(), p.GetPriceUsd(), currentCurrency(r))
if err != nil { if err != nil {
renderHTTPError(w, err, http.StatusInternalServerError) renderHTTPError(w, fmt.Errorf("failed to do currency conversion for product %s: %+v", p.GetId(), err), http.StatusInternalServerError)
return return
} }
ps[i] = productView{p, price} ps[i] = productView{p, price}