(cherry picked from commit 05eb5a5b9da2ab3fba64ea08591fd787a736549e)
handleSuccessViewState
handleFailureViewState