aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/org/traccar/notificators/NotificatorFirebase.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/notificators/NotificatorFirebase.java b/src/main/java/org/traccar/notificators/NotificatorFirebase.java
index 6510963c7..3723a4226 100644
--- a/src/main/java/org/traccar/notificators/NotificatorFirebase.java
+++ b/src/main/java/org/traccar/notificators/NotificatorFirebase.java
@@ -84,7 +84,12 @@ public class NotificatorFirebase implements Notificator {
.build();
try {
- FirebaseMessaging.getInstance().sendMulticast(message);
+ var result = FirebaseMessaging.getInstance().sendMulticast(message);
+ for (var response : result.getResponses()) {
+ if (!response.isSuccessful()) {
+ throw new MessageException(response.getException());
+ }
+ }
} catch (FirebaseMessagingException e) {
throw new MessageException(e);
}