mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-30 02:50:39 +00:00
Handle UnauthenticatedResponseException internally
This commit is contained in:
parent
782f96b580
commit
31dec5a666
7 changed files with 16 additions and 24 deletions
|
@ -6,9 +6,7 @@ import net.sourceforge.argparse4j.inf.Subparser;
|
|||
import org.asamk.signal.OutputWriter;
|
||||
import org.asamk.signal.commands.exceptions.CommandException;
|
||||
import org.asamk.signal.commands.exceptions.IOErrorException;
|
||||
import org.asamk.signal.commands.exceptions.UnexpectedErrorException;
|
||||
import org.asamk.signal.manager.Manager;
|
||||
import org.whispersystems.signalservice.internal.contacts.crypto.UnauthenticatedResponseException;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Optional;
|
||||
|
@ -31,8 +29,6 @@ public class RemovePinCommand implements JsonRpcLocalCommand {
|
|||
) throws CommandException {
|
||||
try {
|
||||
m.setRegistrationLockPin(Optional.empty());
|
||||
} catch (UnauthenticatedResponseException e) {
|
||||
throw new UnexpectedErrorException("Remove pin failed with unauthenticated response: " + e.getMessage(), e);
|
||||
} catch (IOException e) {
|
||||
throw new IOErrorException("Remove pin error: " + e.getMessage(), e);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue