consolidated failure logic