commercetools / sunrise-spa

SUNRISE shop template as a single-page application
https://sunrise-spa.now.sh
Apache License 2.0
51 stars 78 forks source link

Response from an API extension is not visible in UI #263

Closed harrykimpel closed 2 years ago

harrykimpel commented 2 years ago

I have created an API extension for the cart on create/update that checks the amount of line items in the cart. It does not allow more than 10 items in the cart (as an example).

The issue is that the UI does not show the response of the API extension (success/failure).

image

harm-meijer commented 2 years ago

I will need to refactor this code to use Apollo but the old version did not have error handling. The new version that will use composition with Apollo will have this.

If you need help to apply error handling in that page then please let me know (email). The problem with the old version is that cart has repeating code in several components so error handling for cart in the master branch has to be a duplicate implementation.