From dc318ca43d204829b28ca7df97bb033b7fbe0588 Mon Sep 17 00:00:00 2001 From: Banghua ZHao Date: Wed, 27 Nov 2024 11:11:54 +1300 Subject: [PATCH] IOS-9356: Update SDKError to include new case from SDK --- Modules/DataSource/MEGASDK/Sources/MEGASDK | 2 +- iMEGA/Home/UseCase/Domain/Error/SDKError.swift | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Modules/DataSource/MEGASDK/Sources/MEGASDK b/Modules/DataSource/MEGASDK/Sources/MEGASDK index 1866c34b3d..08276b1865 160000 --- a/Modules/DataSource/MEGASDK/Sources/MEGASDK +++ b/Modules/DataSource/MEGASDK/Sources/MEGASDK @@ -1 +1 @@ -Subproject commit 1866c34b3d38147afdca1969cc8170a7fb0c0670 +Subproject commit 08276b1865324f81b965add8a4e3a1a084bfdc61 diff --git a/iMEGA/Home/UseCase/Domain/Error/SDKError.swift b/iMEGA/Home/UseCase/Domain/Error/SDKError.swift index 12b6b7845f..4c70c6e418 100644 --- a/iMEGA/Home/UseCase/Domain/Error/SDKError.swift +++ b/iMEGA/Home/UseCase/Domain/Error/SDKError.swift @@ -76,6 +76,9 @@ enum MEGASDKErrorType: Error { /// Not enough quota case notEnoughQuota(_ description: String) + /// A strongly-grouped request was rolled back + case rolledBack(_ description: String) + /// Multi-factor authentication required case multiFactorAuthenticationRequired(_ description: String) @@ -146,6 +149,7 @@ func transform(error: MEGAError) -> MEGASDKErrorType { case .apiEAppKey: return .invalidApplicationKey(error.name) case .apiESSL: return .invalidSSLKey(error.name) case .apiEgoingOverquota: return .notEnoughQuota(error.name) + case .apiERolledBack: return .rolledBack(error.name) case .apiEMFARequired: return .multiFactorAuthenticationRequired(error.name) case .apiEMasterOnly: return .businessAccountAccessOnly(error.name) case .apiEBusinessPastDue: return .businessAccountExpired(error.name)