Add null check to FCM error log condition
This commit is contained in:
parent
760c5737f9
commit
794e254d90
|
@ -104,7 +104,8 @@ public class FcmSender implements PushNotificationSender {
|
|||
|
||||
if (firebaseMessagingException.getMessagingErrorCode() != null) {
|
||||
errorCode = firebaseMessagingException.getMessagingErrorCode().name();
|
||||
if (firebaseMessagingException.getMessagingErrorCode() == MessagingErrorCode.QUOTA_EXCEEDED) {
|
||||
if (firebaseMessagingException.getMessagingErrorCode() == MessagingErrorCode.QUOTA_EXCEEDED
|
||||
&& firebaseMessagingException.getHttpResponse() != null) {
|
||||
logger.info("FCM request failed with quota exceeded; retry-after: {}, response body: {}",
|
||||
firebaseMessagingException.getHttpResponse().getHeaders().get("retry-after"),
|
||||
firebaseMessagingException.getHttpResponse().getContent());
|
||||
|
|
Loading…
Reference in New Issue