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