Skip to content

Commit 9af9473

Browse files
authored
Merge branch 'main' into fix/SDK-4968
2 parents fa9ffec + dc844e3 commit 9af9473

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

auth0/src/main/java/com/auth0/android/authentication/AuthenticationException.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public class AuthenticationException : Auth0Exception {
8989
if (!TextUtils.isEmpty(description)) {
9090
return description!!
9191
}
92-
return if (UNKNOWN_ERROR == getCode()) {
92+
return if (UNKNOWN_ERROR != getCode()) {
9393
String.format("Received error with code %s", getCode())
9494
} else "Failed with unknown error"
9595
}

auth0/src/test/java/com/auth0/android/authentication/AuthenticationExceptionTest.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,7 @@ public class AuthenticationExceptionTest {
134134
CoreMatchers.`is`(
135135
CoreMatchers.equalTo(
136136
String.format(
137-
"Received error with code %s",
138-
Auth0Exception.UNKNOWN_ERROR
137+
"Failed with unknown error"
139138
)
140139
)
141140
)
@@ -150,7 +149,7 @@ public class AuthenticationExceptionTest {
150149
)
151150
MatcherAssert.assertThat(
152151
ex.getDescription(),
153-
CoreMatchers.`is`(CoreMatchers.equalTo("Failed with unknown error"))
152+
CoreMatchers.`is`(CoreMatchers.equalTo("Received error with code a_valid_code"))
154153
)
155154
}
156155

0 commit comments

Comments
 (0)