Handle error transitions gracefully