mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-11-30 00:56:50 +00:00
Fix permanentFailure field in verification-code responses
This commit is contained in:
1 parent
2f955582a4
commit
7e26b7fe0a
1 file changed
+5
-5
+5
-5
@@ -170,22 +170,22 @@ public class RegistrationServiceClient implements Managed {
|
||||
throw new RegistrationServiceException(buildSessionResponseFromMetadata(response.getSessionMetadata()));
|
||||
|
||||
case SEND_VERIFICATION_CODE_ERROR_TYPE_SENDER_REJECTED ->
|
||||
throw RegistrationServiceSenderException.rejected(response.getError().getMayRetry());
|
||||
throw RegistrationServiceSenderException.rejected(!response.getError().getMayRetry());
|
||||
|
||||
case SEND_VERIFICATION_CODE_ERROR_TYPE_SUSPECTED_FRAUD ->
|
||||
throw new RegistrationFraudException(
|
||||
RegistrationServiceSenderException.rejected(response.getError().getMayRetry()));
|
||||
RegistrationServiceSenderException.rejected(!response.getError().getMayRetry()));
|
||||
|
||||
case SEND_VERIFICATION_CODE_ERROR_TYPE_SENDER_ILLEGAL_ARGUMENT ->
|
||||
throw RegistrationServiceSenderException.illegalArgument(response.getError().getMayRetry());
|
||||
throw RegistrationServiceSenderException.illegalArgument(!response.getError().getMayRetry());
|
||||
|
||||
case SEND_VERIFICATION_CODE_ERROR_TYPE_UNSPECIFIED ->
|
||||
throw RegistrationServiceSenderException.unknown(response.getError().getMayRetry());
|
||||
throw RegistrationServiceSenderException.unknown(!response.getError().getMayRetry());
|
||||
|
||||
case SEND_VERIFICATION_CODE_ERROR_TYPE_TRANSPORT_NOT_ALLOWED ->
|
||||
throw new TransportNotAllowedException(buildSessionResponseFromMetadata(response.getSessionMetadata()));
|
||||
case SEND_VERIFICATION_CODE_ERROR_NO_SENDER_AVAILABLE ->
|
||||
throw RegistrationServiceSenderException.unavailable(response.getError().getMayRetry());
|
||||
throw RegistrationServiceSenderException.unavailable(!response.getError().getMayRetry());
|
||||
|
||||
default -> throw new RuntimeException("Failed to send verification code: " + response.getError().getErrorType());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user