session-ios/SignalServiceKit/src/Util/OWSError.h
Michael Kirk ccb4a88742 Import SSK (and history) into Signal-iOS
git remote add ssk ../SignalServiceKit
git remote update
git merge -s ours --allow-unrelated-histories --no-commit ssk/master
git read-tree --prefix=SignalServiceKit -u ssk/master
git commit
2017-07-21 13:55:01 -04:00

39 lines
1.5 KiB
C

//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
//
NS_ASSUME_NONNULL_BEGIN
extern NSString *const OWSSignalServiceKitErrorDomain;
typedef NS_ENUM(NSInteger, OWSErrorCode) {
OWSErrorCodeInvalidMethodParameters = 11,
OWSErrorCodeUnableToProcessServerResponse = 12,
OWSErrorCodeFailedToDecodeJson = 13,
OWSErrorCodeFailedToEncodeJson = 14,
OWSErrorCodeFailedToDecodeQR = 15,
OWSErrorCodePrivacyVerificationFailure = 20,
OWSErrorCodeUntrustedIdentityKey = 25,
OWSErrorCodeFailedToSendOutgoingMessage = 30,
OWSErrorCodeFailedToDecryptMessage = 100,
OWSErrorCodeFailedToEncryptMessage = 110,
OWSErrorCodeSignalServiceFailure = 1001,
OWSErrorCodeSignalServiceRateLimited = 1010,
OWSErrorCodeUserError = 2001,
OWSErrorCodeNoSuchSignalRecipient = 777404,
OWSErrorCodeMessageSendDisabledDueToPreKeyUpdateFailures = 777405,
OWSErrorCodeMessageSendFailedToBlockList = 777406,
OWSErrorCodeMessageSendNoValidRecipients = 777407,
OWSErrorCodeContactsUpdaterRateLimit = 777407,
};
extern NSError *OWSErrorWithCodeDescription(OWSErrorCode code, NSString *description);
extern NSError *OWSErrorMakeUnableToProcessServerResponseError();
extern NSError *OWSErrorMakeFailedToSendOutgoingMessageError();
extern NSError *OWSErrorMakeNoSuchSignalRecipientError();
extern NSError *OWSErrorMakeAssertionError();
extern NSError *OWSErrorMakeMessageSendDisabledDueToPreKeyUpdateFailuresError();
extern NSError *OWSErrorMakeMessageSendFailedToBlockListError();
NS_ASSUME_NONNULL_END