handling error with invalid cart