Skip to content

Commit

Permalink
IOS-9356: Update SDKError to include new case from SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
bz-Mega committed Nov 26, 2024
1 parent 824153a commit dc318ca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Modules/DataSource/MEGASDK/Sources/MEGASDK
Submodule MEGASDK updated from 1866c3 to 08276b
4 changes: 4 additions & 0 deletions iMEGA/Home/UseCase/Domain/Error/SDKError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit dc318ca

Please sign in to comment.