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

CognitoUser.deleteUser(GenericHandler handler) doesn't call handler for success. #304

Closed
AngusMorton opened this issue May 30, 2017 · 2 comments

Comments

@AngusMorton
Copy link

AngusMorton commented May 30, 2017

In the Cognito Identity Provider, the deleteUser method does not call the provided GenericHandler when it has succeeded.

public void deleteUser(GenericHandler callback) {
  if (callback == null) {
    throw new CognitoParameterInvalidException("callback is null");
  }
  
  try {
    deleteUserInternal(this.getCachedSession());
  } catch (final Exception e) {
    callback.onFailure(e);
  }
}

Should probably be:

public void deleteUser(GenericHandler callback) {
  if (callback == null) {
    throw new CognitoParameterInvalidException("callback is null");
  }
  
  try {
    deleteUserInternal(this.getCachedSession());
    callback.onSuccess();
  } catch (final Exception e) {
    callback.onFailure(e);
  }
}

This would make the API consistent with deleteUserInBackground.

@mutablealligator
Copy link
Contributor

Hi Angus,

Thank you for pointing this out. We will take a look at it.

@mutablealligator
Copy link
Contributor

Fixed in 2.6.5 release.

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

2 participants