Mutation discountAutomaticBasicCreate will not throw an error if failed

Api version

2025-10

Detail

Create an automatic basic discount will not return an error / userErrors / http bad request error if the title conflicts with existing automatic basic discount.

Step to reproduce

Create first automatic basic discount mutation with title “Test“.

Follow the first step again with the same title “Test”, the error / userErrors in mutation is empty, http request succeeded but only first discount exists.

Hey @Polarove, Are you still seeing this behavior? If so, can you share the x-request-id from the response headers of the mutation where you expected an error?

The reason I ask is I tested this on my store using API version 2025-10 and received an error as expected when creating a duplicate automatic discount.

  1. First mutation with title “Test” → Successfully created discount
  2. Second mutation with same title “Test” → Returned this userError:
{
  "automaticDiscountNode": null,
  "userErrors": [
    {
      "field": ["automaticBasicDiscount", "title"],
      "message": "Title must be unique for automatic discount."
    }
  ]
}

The mutation properly failed with a validation error instead of silently succeeding.