returning the error result directly from the when
This commit is contained in:
parent
82feda476d
commit
daecd7d43a
@ -67,10 +67,10 @@ class FtueAuthPhoneConfirmationFragment @Inject constructor() : AbstractFtueAuth
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onError(throwable: Throwable) {
|
override fun onError(throwable: Throwable) {
|
||||||
when (throwable) {
|
views.phoneConfirmationInput.error = when (throwable) {
|
||||||
// The entered code is not correct
|
// The entered code is not correct
|
||||||
is Failure.SuccessError -> views.phoneConfirmationInput.error = getString(R.string.login_validation_code_is_not_correct)
|
is Failure.SuccessError -> getString(R.string.login_validation_code_is_not_correct)
|
||||||
else -> views.phoneConfirmationInput.error = errorFormatter.toHumanReadable(throwable)
|
else -> errorFormatter.toHumanReadable(throwable)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user