Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AuthenticationException.getDescription() has reversed if-logic #755

Closed
6 tasks done
joknu1 opened this issue Aug 6, 2024 · 1 comment
Closed
6 tasks done

AuthenticationException.getDescription() has reversed if-logic #755

joknu1 opened this issue Aug 6, 2024 · 1 comment
Labels
bug This points to a verified bug in the code

Comments

@joknu1
Copy link

joknu1 commented Aug 6, 2024

Checklist

Description

In com.auth0.android.authentication.AuthenticationException there is a function:

    public fun getDescription(): String {
        if (!TextUtils.isEmpty(description)) {
            return description!!
        }
        return if (UNKNOWN_ERROR == getCode()) {
            String.format("Received error with code %s", getCode())
        } else "Failed with unknown error"
    }

where I would expect latter if to check for non-equal UNKNOWN_ERROR != getCode() instead.

Reproduction

  1. Open AuthenticationException
  2. Check logic of getDescription()

Additional context

No response

Auth0.Android version

2.11.0

Android version(s)

14

@joknu1 joknu1 added the bug This points to a verified bug in the code label Aug 6, 2024
@pmathew92
Copy link
Contributor

Closing this as this has been fixed as part of
#756

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This points to a verified bug in the code
Projects
None yet
Development

No branches or pull requests

2 participants