Skip to content

Commit

Permalink
[MS-TEST] Test: 에러 범위 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
tjdgns8439 committed Jul 31, 2024
1 parent ef26e7e commit 8bb440e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/com/modutaxi/api/common/fcm/FcmService.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

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

import com.google.firebase.FirebaseException;
import com.google.firebase.messaging.ApnsConfig;
import com.google.firebase.messaging.Aps;
import com.google.firebase.messaging.FirebaseMessaging;
import com.google.firebase.messaging.FirebaseMessagingException;
import com.google.firebase.messaging.Message;
import com.google.firebase.messaging.Notification;
import com.google.gson.Gson;
Expand Down Expand Up @@ -51,7 +51,7 @@ public void subscribe(Long memberId, Long roomId) {
.subscribeToTopic(
Collections.singletonList(fcmToken), Long.toString(roomId));
log.info("FCM SUBSCRIBE");
} catch (FirebaseException e) {
} catch (FirebaseMessagingException e) {
log.error("FAIL FCM SUBSCRIBE");
throw new BaseException(ChatErrorCode.FAIL_FCM_SUBSCRIBE);
}
Expand All @@ -63,7 +63,7 @@ public void unsubscribe(Long memberId, Long roomId) {
FirebaseMessaging.getInstance()
.unsubscribeFromTopic(
Collections.singletonList(fcmToken), Long.toString(roomId));
} catch (FirebaseException e) {
} catch (FirebaseMessagingException e) {
throw new BaseException(ChatErrorCode.FAIL_FCM_UNSUBSCRIBE);
}
}
Expand All @@ -74,7 +74,7 @@ public void send(Message message) {
Gson gson = new Gson();
String fcmMessageJson = gson.toJson(message);
log.info("FCM 메시지: " + fcmMessageJson);
} catch (FirebaseException e) {
} catch (FirebaseMessagingException e) {
log.error(ChatErrorCode.FAIL_SEND_MESSAGE.getMessage());
log.error("message: {}", e.getMessage());
log.error("localizedMessage: {}", e.getLocalizedMessage());
Expand Down

0 comments on commit 8bb440e

Please sign in to comment.