2022-06-28 09:53:03 +02:00
|
|
|
// Copyright © 2022 Rangeproof Pty Ltd. All rights reserved.
|
|
|
|
|
|
|
|
import Foundation
|
|
|
|
|
|
|
|
public enum OpenGroupAPIError: LocalizedError {
|
|
|
|
case decryptionFailed
|
|
|
|
case signingFailed
|
|
|
|
case noPublicKey
|
2022-08-01 07:45:59 +02:00
|
|
|
case invalidEmoji
|
2022-06-28 09:53:03 +02:00
|
|
|
|
|
|
|
public var errorDescription: String? {
|
|
|
|
switch self {
|
|
|
|
case .decryptionFailed: return "Couldn't decrypt response."
|
|
|
|
case .signingFailed: return "Couldn't sign message."
|
|
|
|
case .noPublicKey: return "Couldn't find server public key."
|
2022-08-01 07:45:59 +02:00
|
|
|
case .invalidEmoji: return "The emoji is invalid."
|
2022-06-28 09:53:03 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|