Skip to content

Commit 1454682

Browse files
committed
Add unableToStartLoginSession Error
1 parent 49d4c0a commit 1454682

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

WordPress/Classes/Login/WordPressDotComAuthenticator.swift

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ struct WordPressDotComAuthenticator {
2020
case parsing(DecodingError)
2121
case cancelled
2222
case unknown(Swift.Error)
23+
case unableToStartLoginSession
2324
}
2425

2526
@MainActor
@@ -67,6 +68,8 @@ struct WordPressDotComAuthenticator {
6768
// These errors are unexpected.
6869
wpAssertionFailure("WP.com web login failed", userInfo: ["error": "\(error)"])
6970
alertMessage = SharedStrings.Error.generic
71+
case .unableToStartLoginSession:
72+
alertMessage = Strings.unableToStartLoginSession
7073
}
7174

7275
let alert = UIAlertController(
@@ -182,4 +185,12 @@ struct WordPressDotComAuthenticator {
182185
throw Error.unknown(error)
183186
}
184187
}
188+
189+
enum Strings {
190+
static let unableToStartLoginSession = NSLocalizedString(
191+
"com.wordpress.authenticator.unable-to-start-login",
192+
value: "Unable to start login session. Please try again.",
193+
comment: "A rare error that occurs when trying to start a login session."
194+
)
195+
}
185196
}

0 commit comments

Comments
 (0)