Handle error passed to afterRegister