From 451e77d24f29e6e5a0d4513b604ffcd82f00ceea Mon Sep 17 00:00:00 2001 From: Nils Ove Tendenes Date: Thu, 13 Jun 2024 09:54:08 +0200 Subject: [PATCH] fix: rm attempt to log error on successful GETs --- service/updateService.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/service/updateService.go b/service/updateService.go index fb91964..73937d1 100644 --- a/service/updateService.go +++ b/service/updateService.go @@ -93,14 +93,12 @@ func (service UpdateServiceImpl) GetUpdates(ctx context.Context, catalogId strin if databaseUpdates == nil { logrus.Error("No updates found") - logging.LogAndPrintError(err) - pagination := model.Pagination{ TotalPages: 0, Page: page, Size: size } + pagination := model.Pagination{TotalPages: 0, Page: page, Size: size} return model.Updates{Updates: []model.Update{}, Pagination: pagination}, http.StatusOK } else { - logrus.Info("Returning updates") - logging.LogAndPrintError(err) + logrus.Debug("Returning updates") totalPages := int(math.Ceil(float64(count) / float64(size))) - pagination := model.Pagination{ TotalPages: totalPages, Page: page, Size: size } + pagination := model.Pagination{TotalPages: totalPages, Page: page, Size: size} return model.Updates{Updates: databaseUpdates, Pagination: pagination}, http.StatusOK } } @@ -113,7 +111,6 @@ func (service UpdateServiceImpl) GetUpdate(ctx context.Context, catalogId string return nil, http.StatusInternalServerError } else if update == nil { logrus.Error("update not found") - logging.LogAndPrintError(err) return nil, http.StatusNotFound } else { return update, http.StatusOK