Skip to content

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

Change return Error to raise Error

Krzysztof Świątek03d760ea5273
diff --git a/saleor/graphql/checkout/mutations.py b/saleor/graphql/checkout/mutations.py
index d18004d2d8..6714a3b654 100644
--- a/saleor/graphql/checkout/mutations.py
+++ b/saleor/graphql/checkout/mutations.py
@@ -730,7 +730,7 @@ class CheckoutComplete(BaseMutation):
code=CheckoutErrorCode.VOUCHER_NOT_APPLICABLE,
)
except TaxError as tax_error:
- return ValidationError(
+ raise ValidationError(
"Unable to calculate taxes - %s" % str(tax_error),
code=CheckoutErrorCode.TAX_ERROR,
)