SAP / spartacus

Spartacus is a lean, Angular-based JavaScript storefront for SAP Commerce Cloud that communicates exclusively through the Commerce REST API.
Apache License 2.0
736 stars 381 forks source link

Cannot remove a coupon from cart if the coupon code contains "/" #4726

Open KevinSu89 opened 4 years ago

KevinSu89 commented 4 years ago

Cannot remove a coupon from cart if the coupon code contains "/"

Environment Details

Steps to Reproduce

  1. Create a coupon which the code contains "/", e.g. abcd/efg
  2. Apply this coupon to a cart
  3. Remove this coupon from cart

Observed Results

The remove request get "400" as the return

Expected Results

The coupon can be removed successfully

Offer to Fix

NO.

Additional Information

When testing this via Swagger UI, the return is HTTP Status 400 – Bad Request (coupon code = abcd/efg)

markywilson commented 3 years ago

This issue is still happening and after deeper investigation, it seems that the issue has to do the request mapping in the endpoint. Spartacus makes the right API call with the right params but it gets handled incorrectly.

tobi-or-not-tobi commented 3 years ago

Dropping bug label as this is not a Spartacus bug, nor something we can fix in Spartacus. It's an important issue and we must track this, see https://cxjira.sap.com/browse/STING-17 for the backend ticket.

Closing #4724 and #4725 to keep a single ticket in Spartacus to track progress.