Skip to content

Commit

Permalink
BREAKING CHANGE: updated description of AuthenticationException in ca…
Browse files Browse the repository at this point in the history
…se of empty description
  • Loading branch information
desusai7 committed Aug 7, 2024
1 parent d8ac49e commit dd61ad2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public class AuthenticationException : Auth0Exception {
if (!TextUtils.isEmpty(description)) {
return description!!
}
return if (UNKNOWN_ERROR == getCode()) {
return if (UNKNOWN_ERROR != getCode()) {
String.format("Received error with code %s", getCode())
} else "Failed with unknown error"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,7 @@ public class AuthenticationExceptionTest {
CoreMatchers.`is`(
CoreMatchers.equalTo(
String.format(
"Received error with code %s",
Auth0Exception.UNKNOWN_ERROR
"Failed with unknown error"
)
)
)
Expand All @@ -150,7 +149,7 @@ public class AuthenticationExceptionTest {
)
MatcherAssert.assertThat(
ex.getDescription(),
CoreMatchers.`is`(CoreMatchers.equalTo("Failed with unknown error"))
CoreMatchers.`is`(CoreMatchers.equalTo("Received error with code a_valid_code"))
)
}

Expand Down

0 comments on commit dd61ad2

Please sign in to comment.