Change onViewError event to onFail.