Skip to content

Commit ea6084b

Browse files
committed
refactor :: FirebaseMessaging token 발급 예외처리 변경
1 parent 1d522a3 commit ea6084b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

core/device/src/main/java/team/retum/device/DeviceTokenManager.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package team.retum.device
22

3+
import android.util.Log
34
import com.google.firebase.messaging.FirebaseMessaging
45
import kotlinx.coroutines.CoroutineScope
56
import kotlinx.coroutines.Dispatchers
@@ -17,7 +18,8 @@ class DeviceTokenManager @Inject constructor(
1718
suspend fun fetchDeviceToken() {
1819
FirebaseMessaging.getInstance().token.addOnCompleteListener { task ->
1920
if (!task.isSuccessful) {
20-
throw DeviceTokenException()
21+
Log.d("DeviceTokenManager", "Fetching FCM registration token failed", task.exception,)
22+
return@addOnCompleteListener
2123
}
2224
CoroutineScope(Dispatchers.IO).launch {
2325
saveDeviceToken(deviceToken = task.result)

0 commit comments

Comments
 (0)