Skip to content

Commit 8322f9d

Browse files
committed
chore(flipcash): silence NotFound errors for getUserProfile
Signed-off-by: Brandon McAnsh <[email protected]>
1 parent e30a29b commit 8322f9d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

services/flipcash/src/main/kotlin/com/flipcash/services/internal/repositories/InternalProfileRepository.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package com.flipcash.services.internal.repositories
33
import com.flipcash.services.internal.domain.SocialAccountMapper
44
import com.flipcash.services.internal.domain.UserProfileMapper
55
import com.flipcash.services.internal.network.services.ProfileService
6+
import com.flipcash.services.models.GetUserProfileError
67
import com.flipcash.services.models.SocialAccount
78
import com.flipcash.services.models.SocialAccountLinkRequest
89
import com.flipcash.services.models.SocialAccountUnlinkRequest
@@ -20,7 +21,11 @@ internal class InternalProfileRepository(
2021
override suspend fun getProfile(userId: ID, owner: Ed25519.KeyPair): Result<UserProfile> {
2122
return service.getProfile(userId, owner)
2223
.map { userProfileMapper.map(it) }
23-
.onFailure { ErrorUtils.handleError(it) }
24+
.onFailure {
25+
if (it !is GetUserProfileError.NotFound) {
26+
ErrorUtils.handleError(it)
27+
}
28+
}
2429
}
2530

2631
override suspend fun setDisplayName(

0 commit comments

Comments
 (0)