Skip to content

Commit d1905f0

Browse files
committed
chore(fc): trace failed calls for user flags during login
Signed-off-by: Brandon McAnsh <[email protected]>
1 parent 3711242 commit d1905f0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

flipchatApp/src/main/kotlin/xyz/flipchat/app/auth/AuthManager.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ class AuthManager @Inject constructor(
5555

5656
companion object {
5757
private const val TAG = "AuthManager"
58-
internal fun taggedTrace(message: String, type: TraceType = TraceType.Log) {
59-
trace(message = message, type = type, tag = TAG)
58+
internal fun taggedTrace(message: String, type: TraceType = TraceType.Log, cause: Throwable? = null) {
59+
trace(message = message, type = type, tag = TAG, error = cause)
6060
}
6161
}
6262

@@ -229,9 +229,9 @@ class AuthManager @Inject constructor(
229229

230230
profileController.getUserFlags()
231231
.onSuccess {
232-
println("$it")
233232
userManager.set(authState = if (it?.isRegistered == true) AuthState.LoggedIn else AuthState.Unregistered)
234233
}.onFailure {
234+
taggedTrace("Failed to get user flags", type = TraceType.Error, cause = it)
235235
userManager.set(authState = AuthState.Unregistered)
236236
}
237237

0 commit comments

Comments
 (0)