-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document error states for applyDiscountCodeChange
#2133
Comments
Documenting for reference the ones I've found so far:
|
Also:
|
|
|
Found another one:
|
Ah. And another one which looks like a failure mode:
|
Here's a new one:
Dunno what that means. |
And another:
Not sure how that one works - I guess that must be set somewhere within the store? Curious. |
As requested in #2521, I have re-raised this issue as: https://community.shopify.dev/t/feature-request-document-error-states-for-applydiscountcodechange/6406 |
Please list the related package(s)
If this related to specific APIs or components, please list them here
Is your feature request related to a problem? Please describe.
According to the error state documentation for applyDiscountCodeChange, the error message is:
Given the message shouldn't be displayed to the buyer, we want to show a relevant, actionable, useful message to the buyer. For instance, I would assume (but do not know) that an error could be that the discount requires certain criteria to be fulfilled.
It's unclear what the possible error states could be, and therefore it's difficult to determine what localised messaging we should provide to the user.
Furthermore, the docs says:
Which is unclear because it's not clear if that's something we can detect beforehand (so we don't even try to apply a discount) or whether we should show a message. Further documentation on what the behaviour should be in this case, and how we can action it appropriately would be greatly appreciated.
We intend, in the meantime, to capture the message and record it via something like Sentry, but this requires us to monitor errors we will see and then build localised messaging off those errors.
It would be great to document the messages or types of failures that could be possible so we can provide actionable messaging and build logic to prevent a bad experience.
Describe the changes you are looking for
Clear documentation of the types of errors that are possible, and guidance on what localised messaging should be shown to users.
For instance, a table showing something like:
etc etc.
Describe alternatives you’ve considered
Guess work and trying out a few things to see what happened.
e.g. we got one message:
This turned out to be because the discounts weren't setup correctly. This one we'd assume we'd want to capture, alert our shopify admins, and provide a message saying either to contact support or try again later.
Additional context
The text was updated successfully, but these errors were encountered: