Add localization for authentication errors

This commit is contained in:
Philippe Loriaux
2022-11-04 11:49:09 +01:00
parent afe965e5d3
commit 0a6d7b7f68
14 changed files with 97 additions and 10 deletions
@@ -127,7 +127,8 @@ final class ChangePasswordCoordinator: Coordinator, Presentable {
/// Processes an error to either update the flow or display it to the user.
@MainActor private func handleError(_ error: Error) {
if let mxError = MXError(nsError: error as NSError) {
changePasswordViewModel.displayError(.mxError(mxError.error))
let message = mxError.authenticationErrorMessage()
changePasswordViewModel.displayError(.mxError(message))
return
}