isSuccess
Checks whether the asynchronous operation completed successfully.
This method determines success by checking if the exception field is null. A null exception indicates that the operation completed without errors.
Usage pattern: Always call this method first before accessing getData or getException to determine which accessor to use. Example:
if (result.isSuccess()) {
// Operation succeeded - safe to get data
String token = result.getData().getToken();
} else {
// Operation failed - safe to get exception
Exception error = result.getException();
Log.e("App", "Error: " + error.getMessage());
}
Content copied to clipboard
Return
true if the operation completed successfully (exception is null), false otherwise