unique error code for rate-limit

// FREEBIE
pull/1/head
Michael Kirk 9 years ago committed by Matthew Chen
parent 7b7b338075
commit d7149c60dd

@ -434,7 +434,7 @@ NSString *const OWSMessageSenderRateLimitedException = @"RateLimitedException";
}
if ([exception.name isEqualToString:OWSMessageSenderRateLimitedException]) {
NSError *error = OWSErrorWithCodeDescription(OWSErrorCodeUntrustedIdentityKey,
NSError *error = OWSErrorWithCodeDescription(OWSErrorCodeSingalServiceRateLimited,
NSLocalizedString(@"FAILED_SENDING_BECAUSE_RATE_LIMIT",
@"action sheet header when re-sending message which failed because of too many attempts"));
return failureHandler(error);

@ -15,6 +15,7 @@ typedef NS_ENUM(NSInteger, OWSErrorCode) {
OWSErrorCodeFailedToSendOutgoingMessage = 30,
OWSErrorCodeFailedToDecryptMessage = 100,
OWSErrorCodeSignalServiceFailure = 1001,
OWSErrorCodeSingalServiceRateLimited = 1010,
OWSErrorCodeUserError = 2001,
};

Loading…
Cancel
Save