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

Wrong error code value for SumUpSDKError #142

Open
serybva opened this issue May 31, 2024 · 0 comments
Open

Wrong error code value for SumUpSDKError #142

serybva opened this issue May 31, 2024 · 0 comments

Comments

@serybva
Copy link

serybva commented May 31, 2024

SumUpSDK.login(withToken: "dummy-access-token") { (success: Bool, error: Error?) in
  if ((error as NSError?)?.code == SumUpSDKError.invalidAccessToken.rawValue) {
    print("Invalid token")
  } else {
    print("Unknown error")
   }
 }

Would output "Unknown error" as the error code value is actually 20 and SumUpSDKError.invalidAccessToken.rawValue is 54

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant