Improve shopping cart and REST API error handling