I am serving an app using the cart and checkout validation api.
In some themes, when I press the “Add to Cart” button and the cart and check out validation api returns an error, the error message is no longer displayed.
Attached is an example from Dawn.
Below is an example of the “Dawn” theme.
Until now, a message was displayed when you clicked the “Add to Cart” button.
However, I am currently unable to display the error message.
This is thought to be due to a change in the response from the server side. This may be due to the “description property” being null.
Hey @azy - I can’t say for certain without digging into this more, but it’s possible this could be an issue specific to those themes - do you have an example theme where the “null” issue appeared we can take a look at to try and replicate this?
If you’re willing to share the shop and the theme where you saw the “null” error pop up (either here on in a DM), just let me know and I’d be happy to take a look!
it’s possible this could be an issue specific to those themes - do you have an example theme where the “null” issue appeared we can take a look at to try and replicate this?
I just created preview store as follows;
(please go to product handle is “products/chain-bracelet”)
pw: shopify_password_protected
I can’t find your DM link, so I can’t contact your actual shop, but please DM me if necessary.
Since I can no longer display error messages from the Cart and Checkout api, I’m trying to release code that overlaps fetch or xhr so that messages can be displayed, but I would like to avoid this if possible as it may cause unexpected problems or conflict with Shopify’s standard functions.
No worries @Azy! - I can DM you on my end here so we can discuss the details of the shop if you’d prefer to keep that private. I’ll message you in just a second
Hey @Alan_G I don’t think this is an issue with just a few themes.
It has been occurring since at least June 5th, and I emailed Shopify Support immediately after discovering it, but I haven’t received a response.
I would like clarification on whether this change is temporary or a specification change. Our app’s development strategy will change depending on your answer.
We are also experiencing the same issue in our Shopify app and have received numerous inquiries from our merchants. Could you please share the latest status or any updates regarding this issue?
We would also appreciate clarification on whether this behavior is considered a permanent specification change or a temporary bug, since it will affect our app development roadmap.
Hello,
We are tracking this issue with @Alan_G -san, and it has already passed it to special team.
Looks like we’ll have to wait a while until the problem is resolved.
Hi @kyoshi - just confirming what @azy mentioned here. We are currently working on a fix for this. I still can’t guarantee an exact turnaround time for when this will be deployed, but it is something we are actively working on and I’ll get back in touch with all of you here in this thread when I can confirm the fix has been sent out on our end
We also have a Cart & Checkout validation function, and errors returned from it go into the “message” property in the body of add.js response and we are increasingly seeing complains from merchants that errors are not being displayed in the theme, and after investigation it looks like those themes are displaying error message from “description” field instead of “message” field, is there a way we can send “message” and “description” from Cart & Checkout validation function? Otherwise,
we would have to monkey-patch xhr/fetch function and trap the error message and display it, which sounds like a massive error-prone hack
Hey @Kets_Patel, thanks for the report here as well.
We’ve identified an inconsistency in the Ajax cart error payloads and the team is actively working on a fix. There’s no action required on your Function code; Functions can’t directly control the Ajax error fields. We don’t recommend heavy client-side workarounds like monkey‑patching fetch/xhr. If you need immediate relief, themes can safely read either description or message until the fix lands (for example, read description first and, if it’s missing/null, fall back to message).
Just wanted to reach out to confirm I’m still tracking this thread and will update you folks once the change is deployed. Let me know if I can clarify anything more on my end here!
Hey folks, a fix for this has been deployed and should be rolled out, can you let me know if you are all still seeing this issue? If so, just ping me here and I am more than happy to investigate further.
Thank you for your kind response.
I have confirmed that the message is displayed properly on my development store and on the stores of customers who have installed the app.
I would like to thank Alan-san and the Shopify team for their response.
Thank you very much.