Skip to content

Commit 8bb440e

Browse files
committed
[MS-TEST] Test: 에러 범위 수정
1 parent ef26e7e commit 8bb440e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/java/com/modutaxi/api/common/fcm/FcmService.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
import static com.modutaxi.api.common.constants.ServerConstants.FCM_DEFAULT_TOKEN;
44

5-
import com.google.firebase.FirebaseException;
65
import com.google.firebase.messaging.ApnsConfig;
76
import com.google.firebase.messaging.Aps;
87
import com.google.firebase.messaging.FirebaseMessaging;
8+
import com.google.firebase.messaging.FirebaseMessagingException;
99
import com.google.firebase.messaging.Message;
1010
import com.google.firebase.messaging.Notification;
1111
import com.google.gson.Gson;
@@ -51,7 +51,7 @@ public void subscribe(Long memberId, Long roomId) {
5151
.subscribeToTopic(
5252
Collections.singletonList(fcmToken), Long.toString(roomId));
5353
log.info("FCM SUBSCRIBE");
54-
} catch (FirebaseException e) {
54+
} catch (FirebaseMessagingException e) {
5555
log.error("FAIL FCM SUBSCRIBE");
5656
throw new BaseException(ChatErrorCode.FAIL_FCM_SUBSCRIBE);
5757
}
@@ -63,7 +63,7 @@ public void unsubscribe(Long memberId, Long roomId) {
6363
FirebaseMessaging.getInstance()
6464
.unsubscribeFromTopic(
6565
Collections.singletonList(fcmToken), Long.toString(roomId));
66-
} catch (FirebaseException e) {
66+
} catch (FirebaseMessagingException e) {
6767
throw new BaseException(ChatErrorCode.FAIL_FCM_UNSUBSCRIBE);
6868
}
6969
}
@@ -74,7 +74,7 @@ public void send(Message message) {
7474
Gson gson = new Gson();
7575
String fcmMessageJson = gson.toJson(message);
7676
log.info("FCM 메시지: " + fcmMessageJson);
77-
} catch (FirebaseException e) {
77+
} catch (FirebaseMessagingException e) {
7878
log.error(ChatErrorCode.FAIL_SEND_MESSAGE.getMessage());
7979
log.error("message: {}", e.getMessage());
8080
log.error("localizedMessage: {}", e.getLocalizedMessage());

0 commit comments

Comments
 (0)