Better logging for registration failure
This commit is contained in:
parent
c9082a63f0
commit
a754eb6faf
@ -39,6 +39,7 @@ import org.whispersystems.signalservice.api.push.ACI;
|
|||||||
import org.whispersystems.signalservice.api.push.PNI;
|
import org.whispersystems.signalservice.api.push.PNI;
|
||||||
import org.whispersystems.signalservice.api.push.SignalServiceAddress;
|
import org.whispersystems.signalservice.api.push.SignalServiceAddress;
|
||||||
import org.whispersystems.signalservice.api.push.exceptions.AlreadyVerifiedException;
|
import org.whispersystems.signalservice.api.push.exceptions.AlreadyVerifiedException;
|
||||||
|
import org.whispersystems.signalservice.api.push.exceptions.DeprecatedVersionException;
|
||||||
import org.whispersystems.signalservice.internal.push.VerifyAccountResponse;
|
import org.whispersystems.signalservice.internal.push.VerifyAccountResponse;
|
||||||
import org.whispersystems.signalservice.internal.util.DynamicCredentialsProvider;
|
import org.whispersystems.signalservice.internal.util.DynamicCredentialsProvider;
|
||||||
|
|
||||||
@ -114,6 +115,7 @@ class RegistrationManagerImpl implements RegistrationManager {
|
|||||||
throw new IOException("Account is registered in another environment: " + account.getServiceEnvironment());
|
throw new IOException("Account is registered in another environment: " + account.getServiceEnvironment());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
if (account.getAci() != null && attemptReactivateAccount()) {
|
if (account.getAci() != null && attemptReactivateAccount()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -124,6 +126,10 @@ class RegistrationManagerImpl implements RegistrationManager {
|
|||||||
voiceVerification,
|
voiceVerification,
|
||||||
captcha);
|
captcha);
|
||||||
NumberVerificationUtils.requestVerificationCode(accountManager, sessionId, voiceVerification);
|
NumberVerificationUtils.requestVerificationCode(accountManager, sessionId, voiceVerification);
|
||||||
|
} catch (DeprecatedVersionException e) {
|
||||||
|
logger.debug("Signal-Server returned deprecated version exception", e);
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -92,7 +92,8 @@ public class RegisterCommand implements RegistrationCommand, JsonRpcRegistration
|
|||||||
} catch (NonNormalizedPhoneNumberException e) {
|
} catch (NonNormalizedPhoneNumberException e) {
|
||||||
throw new UserErrorException("Failed to register: " + e.getMessage(), e);
|
throw new UserErrorException("Failed to register: " + e.getMessage(), e);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new IOErrorException("Failed to register: " + e.getMessage(), e);
|
throw new IOErrorException("Failed to register: %s (%s)".formatted(e.getMessage(),
|
||||||
|
e.getClass().getSimpleName()), e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user