@Override
public void messageReceived(CommandResponse response) {
SuccessCommandResponse successResponse = response.asSuccess();
if (successResponse == null) {
FailedCommandResponse failure = response.asFailure();
failure("Remote error: " + failure.message(), failure.errorDetails());
} else {
success(successResponse);
}
}
}