Merge branch 'feature/contactsIntersectionAudit'

This commit is contained in:
Matthew Chen 2017-04-13 15:37:07 -04:00
commit 173823e3ad
2 changed files with 8 additions and 1 deletions

View File

@ -206,7 +206,13 @@ NS_ASSUME_NONNULL_BEGIN
success([NSSet setWithArray:attributesForIdentifier.allKeys]);
}
failure:^(NSURLSessionDataTask *task, NSError *error) {
failure(error);
NSHTTPURLResponse *response = (NSHTTPURLResponse *)task.response;
if (response.statusCode == 413) {
failure(OWSErrorWithCodeDescription(
OWSErrorCodeContactsUpdaterRateLimit, OWSSignalServiceKitErrorDomain));
} else {
failure(error);
}
}];
});
}

View File

@ -23,6 +23,7 @@ typedef NS_ENUM(NSInteger, OWSErrorCode) {
OWSErrorCodeNoSuchSignalRecipient = 777404,
OWSErrorCodeMessageSendDisabledDueToPreKeyUpdateFailures = 777405,
OWSErrorCodeMessageSendFailedToBlockList = 777406,
OWSErrorCodeContactsUpdaterRateLimit = 777407,
};
extern NSError *OWSErrorWithCodeDescription(OWSErrorCode code, NSString *description);