For the bit flip superoperator is $$\mathcal{E}_{BF}(\rho) = (1-p)\rho + p X \rho X$$
where the first term refers to no bit flip and the second term refers to the bit flipping.
A single qubit pure state $|\phi \rangle = \alpha|0 \rangle + \beta |1 \rangle$ corresponds to the density operator $\rho = |\phi \rangle \langle \phi|$. So the bit flip superoperator becomes $$\sigma = (1-p)|\phi \rangle \langle \phi| + p X |\phi \rangle \langle \phi| X$$
A book I'm reading states that the probability of the failure is error due to noise: $$p_{err} = 1- \langle \phi|\sigma | \phi \rangle$$
I'm having trouble understanding this part. I am interpreting 'failure' as a bit flip with probability $p$ but this clearly is wrong. What is 'failure' in this regard?