Send and receive SMS messages using your Android phone programmatically via a simple HTTP API
log waraning when cannot send heartbeat check to phone
Acho Arnold00849dc93e7b
diff --git a/api/pkg/handlers/phone_handler.go b/api/pkg/handlers/phone_handler.goindex 52b3b56c..b64c9d0f 100644--- a/api/pkg/handlers/phone_handler.go+++ b/api/pkg/handlers/phone_handler.go@@ -116,10 +116,6 @@ func (h *PhoneHandler) Upsert(c *fiber.Ctx) error {return h.responseBadRequest(c, err)}- ctxLogger.Info(string(c.Body()))-- ctxLogger.Info(spew.Sdump(request))-if errors := h.validator.ValidateUpsert(ctx, request.Sanitize()); len(errors) != 0 {msg := fmt.Sprintf("validation errors [%s], while updating phones [%+#v]", spew.Sdump(errors), request)ctxLogger.Warn(stacktrace.NewError(msg))diff --git a/api/pkg/services/phone_notification_service.go b/api/pkg/services/phone_notification_service.goindex afafc1ff..480f6c5d 100644--- a/api/pkg/services/phone_notification_service.go+++ b/api/pkg/services/phone_notification_service.go@@ -73,8 +73,9 @@ func (service *PhoneNotificationService) SendHeartbeatFCM(ctx context.Context, pToken: *phone.FcmToken,})if err != nil {- msg := fmt.Sprintf("cannot send heartbeat FCM to phone with id [%s]", phone.ID)- return service.tracer.WrapErrorSpan(span, stacktrace.Propagate(err, msg))+ msg := fmt.Sprintf("cannot send heartbeat FCM to phone with id [%s] for user [%s]", phone.ID, phone.UserID)+ ctxLogger.Warn(stacktrace.Propagate(err, msg))+ return nil}ctxLogger.Info(fmt.Sprintf("successfully sent heartbeat FCM [%s] to phone with ID [%s] for user [%s] and monitor [%s]", result, payload.PhoneID, payload.UserID, payload.MonitorID))