Add error handling to cart