Handle rate limits in registration flow.

pull/1/head
Matthew Chen 7 years ago
parent 7543a82858
commit 9499e684e7

@ -1444,10 +1444,10 @@
/* Alert view title */ /* Alert view title */
"REGISTRATION_VERIFICATION_FAILED_TITLE" = "Verification Failed"; "REGISTRATION_VERIFICATION_FAILED_TITLE" = "Verification Failed";
/* Error message indicating that regitration failed due to a missing or incorrect verification code. */ /* Error message indicating that registration failed due to a missing or incorrect verification code. */
"REGISTRATION_VERIFICATION_FAILED_WRONG_CODE_DESCRIPTION" = "The numbers you submitted don't match what we sent. Want to double check?"; "REGISTRATION_VERIFICATION_FAILED_WRONG_CODE_DESCRIPTION" = "The numbers you submitted don't match what we sent. Want to double check?";
/* Error message indicating that regitration failed due to a missing or incorrect 2FA PIN. */ /* Error message indicating that registration failed due to a missing or incorrect 2FA PIN. */
"REGISTRATION_VERIFICATION_FAILED_WRONG_PIN" = "Incorrect Registration Lock PIN."; "REGISTRATION_VERIFICATION_FAILED_WRONG_PIN" = "Incorrect Registration Lock PIN.";
/* No comment provided by engineer. */ /* No comment provided by engineer. */

@ -394,7 +394,7 @@ NSString *const TSAccountManager_ServerSignalingKey = @"TSStorageServerSignaling
case 403: { case 403: {
NSError *userError = OWSErrorWithCodeDescription(OWSErrorCodeUserError, NSError *userError = OWSErrorWithCodeDescription(OWSErrorCodeUserError,
NSLocalizedString(@"REGISTRATION_VERIFICATION_FAILED_WRONG_CODE_DESCRIPTION", NSLocalizedString(@"REGISTRATION_VERIFICATION_FAILED_WRONG_CODE_DESCRIPTION",
"Error message indicating that regitration failed due to a missing or incorrect " "Error message indicating that registration failed due to a missing or incorrect "
"verification code.")); "verification code."));
failureBlock(userError); failureBlock(userError);
break; break;
@ -411,7 +411,7 @@ NSString *const TSAccountManager_ServerSignalingKey = @"TSStorageServerSignaling
DDLogError(@"%@ 2FA PIN required: %ld", self.logTag, error.code); DDLogError(@"%@ 2FA PIN required: %ld", self.logTag, error.code);
NSError *error = OWSErrorWithCodeDescription(OWSErrorCodeRegistrationMissing2FAPIN, NSError *error = OWSErrorWithCodeDescription(OWSErrorCodeRegistrationMissing2FAPIN,
NSLocalizedString(@"REGISTRATION_VERIFICATION_FAILED_WRONG_PIN", NSLocalizedString(@"REGISTRATION_VERIFICATION_FAILED_WRONG_PIN",
"Error message indicating that regitration failed due to a missing or incorrect 2FA PIN.")); "Error message indicating that registration failed due to a missing or incorrect 2FA PIN."));
failureBlock(error); failureBlock(error);
break; break;
} }

Loading…
Cancel
Save