import org.asamk.signal.commands.exceptions.IOErrorException;
import org.asamk.signal.commands.exceptions.UnexpectedErrorException;
import org.asamk.signal.manager.Manager;
-import org.whispersystems.libsignal.util.guava.Optional;
import org.whispersystems.signalservice.internal.contacts.crypto.UnauthenticatedResponseException;
import java.io.IOException;
+import java.util.Optional;
public class SetPinCommand implements JsonRpcLocalCommand {
var registrationLockPin = ns.getString("pin");
m.setRegistrationLockPin(Optional.of(registrationLockPin));
} catch (UnauthenticatedResponseException e) {
- throw new UnexpectedErrorException("Set pin error failed with unauthenticated response: " + e.getMessage());
+ throw new UnexpectedErrorException("Set pin error failed with unauthenticated response: " + e.getMessage(),
+ e);
} catch (IOException e) {
- throw new IOErrorException("Set pin error: " + e.getMessage());
+ throw new IOErrorException("Set pin error: " + e.getMessage(), e);
}
}
}