mirror of
https://github.com/writeas/writefreely-swiftui-multiplatform.git
synced 2024-11-15 01:11:02 +00:00
Catch both invalidPassword and usernameNotFound AccountErrors
This commit is contained in:
parent
8f6e5b9a0a
commit
216641029d
@ -80,11 +80,15 @@ struct AccountLoginView: View {
|
||||
The server could not be found. Please check that you've entered the information correctly and try again.
|
||||
"""
|
||||
isShowingAlert = true
|
||||
} catch AccountError.invalidCredentials {
|
||||
} catch AccountError.invalidPassword {
|
||||
alertMessage = """
|
||||
Invalid username or password. Please check that you've entered the information correctly and try again.
|
||||
Invalid password. Please check that you've entered your password correctly and try logging in again.
|
||||
"""
|
||||
isShowingAlert = true
|
||||
} catch AccountError.usernameNotFound {
|
||||
alertMessage = """
|
||||
Username not found. Did you use your email address by mistake?
|
||||
"""
|
||||
} catch {
|
||||
alertMessage = "An unknown error occurred. Please try again."
|
||||
isShowingAlert = true
|
||||
|
Loading…
Reference in New Issue
Block a user