As of version 2025-07 of the GraphQL Storefront API, the Cart
object now provides detailed warnings for non-applicable CartDiscountCodes
.
This is a companion discussion topic for the original entry at https://shopify.dev/changelog/add-warnings-for-discount-codes