(cherry picked from commit adf16e17070f4e62b3757228a7b9cf6becda828b)
handleSuccessViewState
handleFailureViewState