Skip to content

Commit a868f00

Browse files
committed
Refactor: 예외 핸들링 로직 수정
1 parent 0e00baa commit a868f00

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

data/src/main/java/com/threegap/bitnagil/data/auth/datasourceimpl/AuthLocalDataSourceImpl.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ class AuthLocalDataSourceImpl @Inject constructor(
99
private val authTokenDataStore: AuthTokenDataStore,
1010
) : AuthLocalDataSource {
1111

12-
override suspend fun getRefreshToken(): String? {
13-
val refreshToken = authTokenDataStore.tokenFlow.firstOrNull()?.refreshToken
14-
return refreshToken
15-
}
12+
override suspend fun getRefreshToken(): String? =
13+
runCatching {
14+
authTokenDataStore.tokenFlow.firstOrNull()?.refreshToken
15+
}.getOrNull()
1616

1717
override suspend fun updateAuthToken(accessToken: String, refreshToken: String): Result<Unit> =
1818
runCatching {

0 commit comments

Comments
 (0)