Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Remove unknown error code
Aleksander Spyra54c3de1fe240
diff --git a/saleor/graphql/core/utils/error_codes.py b/saleor/graphql/core/utils/error_codes.pyindex 73058fe8e5..21177a650e 100644--- a/saleor/graphql/core/utils/error_codes.py+++ b/saleor/graphql/core/utils/error_codes.py@@ -134,8 +134,6 @@ class ShippingErrorCode(Enum):MAX_LESS_THAN_MIN = "max_less_than_min"-ERROR_CODE_UNKNOWN = "unknown"-SALEOR_ERROR_CODE_ENUMS = [AccountErrorCode,CheckoutErrorCode,@@ -154,8 +152,7 @@ for enum in SALEOR_ERROR_CODE_ENUMS:ERROR_CODES = (- [ERROR_CODE_UNKNOWN]- + DJANGO_VALIDATORS_ERROR_CODES+ DJANGO_VALIDATORS_ERROR_CODES+ DJANGO_FORM_FIELDS_ERROR_CODES+ DJANGO_PASSWORD_VALIDATION_ERROR_CODES+ DJANGO_MODEL_FIELDS_ERROR_CODES@@ -169,5 +166,5 @@ def get_error_code_from_error(error):if isinstance(code, Enum):code = code.valueif code not in ERROR_CODES:- return ERROR_CODE_UNKNOWN+ return "null"return codediff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphqlindex 6808ffe09d..ac9ffa5c9d 100644--- a/saleor/graphql/schema.graphql+++ b/saleor/graphql/schema.graphql@@ -1481,7 +1481,6 @@ enum ErrorCode {TOO_MANY_ITEMSUNIQUEUNIQUE_FOR_DATE- UNKNOWNVALUE_ERRORVARIANT_NO_DIGITAL_CONTENTVOID_INACTIVE_PAYMENT