frontend/handlers: wrap err
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
This commit is contained in:
parent
b68f6a0324
commit
e2c48c58d7
1 changed files with 1 additions and 1 deletions
|
@ -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}
|
||||||
|
|
Loading…
Reference in a new issue