Display Error Message for Failed Order Discount #579
tr-elbdev
started this conversation in
Feedback: Discounts APIs
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently, when a discount is returned, no feedback is provided to the user, when EMPTY_DISCOUNT is returned. I would like to add a functionality to display an error message explaining why the discount was not applied.
Code Context
Here is the relevant code for the
run
function:Proposed Feature
When the discount calculation fails (e.g., the cart total does not match any thresholds), an error message should be included in the response to inform the user why the discount could not be applied.
Expected Behavior:
errorMessage
property to theFunctionRunResult
when no discount is applied.Example Response
Current Response:
Proposed Response with Error:
Beta Was this translation helpful? Give feedback.
All reactions