Cannot subscriptionContractUpdate with discount

I cannot cancel subscription contract that has a discount code using the mutation subscriptionContractUpdate.

I get the error below when I call subscriptionDraftCommit:

Contract draft discount with title: "discount21" is invalid

this discount targets the shipping (and not a line),

Any ideas?

Hi there. Could you please DM me with details that will help me look into this (contract ID, order ID, shop, the body of the mutation you’re running, etc.)?

hello there

It seems like the error is related to the discount code that is applied to the subscription contract. The error message is indicating that the discount code is targeting shipping instead of a line item, which could be causing the issue.

To resolve this, you may need to check the configuration of the discount code to ensure that it is targeting the correct line item or product. You can do this by navigating to the Discounts section of your Shopify admin and checking the settings of the discount code.

Once you have confirmed that the discount code is targeting the correct line item or product, you can try cancelling the subscription contract again using the subscriptionContractUpdate mutation.