Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Improve error wording

Ania Warzecha0a0cf32fe09a
diff --git a/saleor/graphql/order/mutations/draft_order_create.py b/saleor/graphql/order/mutations/draft_order_create.py
index 988edfe9c0..5203bdbe4a 100644
--- a/saleor/graphql/order/mutations/draft_order_create.py
+++ b/saleor/graphql/order/mutations/draft_order_create.py
@@ -279,7 +279,7 @@ class DraftOrderCreate(
{
"voucher": ValidationError(
"You cannot use voucherCode in the voucher input. "
- "Please use voucherCode instead.",
+ "Please use voucherCode input instead with a valid voucher code.",
code=OrderErrorCode.INVALID_VOUCHER.value,
)
}
diff --git a/saleor/graphql/order/tests/mutations/test_draft_order_create.py b/saleor/graphql/order/tests/mutations/test_draft_order_create.py
index be6d16cd13..ac1bebe6c8 100644
--- a/saleor/graphql/order/tests/mutations/test_draft_order_create.py
+++ b/saleor/graphql/order/tests/mutations/test_draft_order_create.py
@@ -425,7 +425,7 @@ def test_draft_order_create_with_voucher_code_in_voucher_input(
assert error["code"] == OrderErrorCode.INVALID_VOUCHER.name
assert (
error["message"] == "You cannot use voucherCode in the voucher input. "
- "Please use voucherCode instead."
+ "Please use voucherCode input instead with a valid voucher code."
)