This commit is contained in:
AsamK 2024-02-27 19:35:38 +01:00
parent aebe64571d
commit 5e17fe8414
11 changed files with 28 additions and 29 deletions

View file

@ -15,7 +15,7 @@ import org.asamk.signal.manager.RegistrationManager;
import org.asamk.signal.manager.api.CaptchaRequiredException;
import org.asamk.signal.manager.api.NonNormalizedPhoneNumberException;
import org.asamk.signal.manager.api.RateLimitException;
import org.asamk.signal.manager.api.VerificationMethoNotAvailableException;
import org.asamk.signal.manager.api.VerificationMethodNotAvailableException;
import org.asamk.signal.output.JsonWriter;
import org.asamk.signal.util.CommandUtil;
@ -84,7 +84,7 @@ public class RegisterCommand implements RegistrationCommand, JsonRpcRegistration
} catch (IOException e) {
throw new IOErrorException("Failed to register: %s (%s)".formatted(e.getMessage(),
e.getClass().getSimpleName()), e);
} catch (VerificationMethoNotAvailableException e) {
} catch (VerificationMethodNotAvailableException e) {
throw new UserErrorException("Failed to register: " + e.getMessage() + (
voiceVerification
? ": Before requesting voice verification you need to request SMS verification and wait a minute."

View file

@ -13,7 +13,7 @@ import org.asamk.signal.manager.api.CaptchaRequiredException;
import org.asamk.signal.manager.api.NonNormalizedPhoneNumberException;
import org.asamk.signal.manager.api.NotPrimaryDeviceException;
import org.asamk.signal.manager.api.RateLimitException;
import org.asamk.signal.manager.api.VerificationMethoNotAvailableException;
import org.asamk.signal.manager.api.VerificationMethodNotAvailableException;
import org.asamk.signal.output.OutputWriter;
import org.asamk.signal.util.CommandUtil;
@ -60,7 +60,7 @@ public class StartChangeNumberCommand implements JsonRpcLocalCommand {
} catch (IOException e) {
throw new IOErrorException("Failed to change number: %s (%s)".formatted(e.getMessage(),
e.getClass().getSimpleName()), e);
} catch (VerificationMethoNotAvailableException e) {
} catch (VerificationMethodNotAvailableException e) {
throw new UserErrorException("Failed to register: " + e.getMessage() + (
voiceVerification
? ": Before requesting voice verification you need to request SMS verification and wait a minute."

View file

@ -13,7 +13,7 @@ import org.asamk.signal.manager.api.NonNormalizedPhoneNumberException;
import org.asamk.signal.manager.api.PinLockedException;
import org.asamk.signal.manager.api.RateLimitException;
import org.asamk.signal.manager.api.UserAlreadyExistsException;
import org.asamk.signal.manager.api.VerificationMethoNotAvailableException;
import org.asamk.signal.manager.api.VerificationMethodNotAvailableException;
import org.freedesktop.dbus.DBusPath;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -74,7 +74,7 @@ public class DbusSignalControlImpl implements org.asamk.SignalControl {
throw new Error.InvalidNumber(e.getMessage());
} catch (OverlappingFileLockException e) {
throw new SignalControl.Error.Failure("Account is already in use");
} catch (IOException | VerificationMethoNotAvailableException e) {
} catch (IOException | VerificationMethodNotAvailableException e) {
throw new SignalControl.Error.Failure(e.getClass().getSimpleName() + " " + e.getMessage());
}
}