mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-19 10:38:03 +01:00
Check for null FCM error codes
This commit is contained in:
committed by
Jon Chambers
parent
c9ae991aa3
commit
8956e1e0cf
@@ -87,7 +87,16 @@ public class FcmSender {
|
||||
sendFuture.get();
|
||||
} catch (ExecutionException e) {
|
||||
if (e.getCause() instanceof final FirebaseMessagingException firebaseMessagingException) {
|
||||
tags = tags.and("errorCode", firebaseMessagingException.getMessagingErrorCode().name().toLowerCase());
|
||||
final String errorCode;
|
||||
|
||||
if (firebaseMessagingException.getMessagingErrorCode() != null) {
|
||||
errorCode = firebaseMessagingException.getMessagingErrorCode().name().toLowerCase();
|
||||
} else {
|
||||
logger.warn("Received an FCM exception with no error code", firebaseMessagingException);
|
||||
errorCode = "unknown";
|
||||
}
|
||||
|
||||
tags = tags.and("errorCode", errorCode);
|
||||
|
||||
switch (firebaseMessagingException.getMessagingErrorCode()) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user