From ebe7437bfada939a674af85474415a5d54fcc6b0 Mon Sep 17 00:00:00 2001 From: Andre Medeiros Date: Sat, 7 May 2022 15:10:57 -0400 Subject: [PATCH] log errors on API --- internal/api/accounts.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/internal/api/accounts.go b/internal/api/accounts.go index 8a81204..745bee8 100644 --- a/internal/api/accounts.go +++ b/internal/api/accounts.go @@ -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)