From 9470f548674d800d4e598758bdbb72ef02a25595 Mon Sep 17 00:00:00 2001 From: JulianAlcala Date: Fri, 17 Apr 2026 11:13:59 +0200 Subject: [PATCH] chore(notifications): log push token registration outcome for debugging Add debugPrint entries before and after POST /universal-notifications/push so we can trace whether a given token was accepted by the backend during debugging of push delivery issues. --- .../data/datasource/notifications_remote_datasource_impl.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/sf_shared/lib/src/data/datasource/notifications_remote_datasource_impl.dart b/packages/sf_shared/lib/src/data/datasource/notifications_remote_datasource_impl.dart index 3c97a155..7f48d57f 100644 --- a/packages/sf_shared/lib/src/data/datasource/notifications_remote_datasource_impl.dart +++ b/packages/sf_shared/lib/src/data/datasource/notifications_remote_datasource_impl.dart @@ -1,5 +1,6 @@ import 'package:dio/dio.dart'; import 'package:firebase_messaging/firebase_messaging.dart'; +import 'package:flutter/foundation.dart'; import 'package:sf_infrastructure/sf_infrastructure.dart'; import 'notifications_remote_datasource.dart'; @@ -19,11 +20,13 @@ class NotificationsRemoteDatasourceImpl @override Future registerPushToken(String token) async { + debugPrint('[FCM] registering token: $token'); try { await _repository.post>( '/universal-notifications/push', body: {'token': token}, ); + debugPrint('[FCM] token registered successfully'); } on DioException catch (error) { final apiMsg = error.response?.data; final msg = apiMsg is String