added better cart error handling