log errors on API

This commit is contained in:
Andre Medeiros 2022-05-07 15:10:57 -04:00
parent 10d2e77c4f
commit ebe7437bfa

View file

@ -198,7 +198,13 @@ func (a *api) upsertAccountsHandler(w http.ResponseWriter, r *http.Request) {
return
}
resp, _ := a.httpClient.Do(req)
resp, err := a.httpClient.Do(req)
if err != nil {
a.logger.WithFields(logrus.Fields{
"err": err,
}).Info("failed to remove old client")
return
}
resp.Body.Close()
}(ctx, apns)