Skip to content

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

Remove not_users_address error code

Aleksander Spyrabca700bc748d
diff --git a/saleor/graphql/account/mutations/account.py b/saleor/graphql/account/mutations/account.py
index 27df6c3e68..6b527e58ae 100644
--- a/saleor/graphql/account/mutations/account.py
+++ b/saleor/graphql/account/mutations/account.py
@@ -238,7 +238,7 @@ class AccountSetDefaultAddress(BaseAccountMutation):
{
"id": ValidationError(
"The address doesn't belong to that user.",
- code=AccountErrorCode.NOT_USERS_ADDRESS,
+ code=AccountErrorCode.INVALID,
)
}
)
diff --git a/saleor/graphql/account/mutations/deprecated_account.py b/saleor/graphql/account/mutations/deprecated_account.py
index 323a311f68..4c577d1168 100644
--- a/saleor/graphql/account/mutations/deprecated_account.py
+++ b/saleor/graphql/account/mutations/deprecated_account.py
@@ -142,7 +142,7 @@ class CustomerSetDefaultAddress(BaseMutation):
{
"id": ValidationError(
"The address doesn't belong to that user.",
- code=AccountErrorCode.NOT_USERS_ADDRESS,
+ code=AccountErrorCode.INVALID,
)
}
)
diff --git a/saleor/graphql/account/mutations/staff.py b/saleor/graphql/account/mutations/staff.py
index 6a790f0784..6946443101 100644
--- a/saleor/graphql/account/mutations/staff.py
+++ b/saleor/graphql/account/mutations/staff.py
@@ -333,7 +333,7 @@ class AddressSetDefault(BaseAccountMutation):
{
"address_id": ValidationError(
"The address doesn't belong to that user.",
- code=AccountErrorCode.NOT_USERS_ADDRESS,
+ code=AccountErrorCode.INVALID,
)
}
)
diff --git a/saleor/graphql/core/utils/error_codes.py b/saleor/graphql/core/utils/error_codes.py
index 75dde4c4a3..e7b2758514 100644
--- a/saleor/graphql/core/utils/error_codes.py
+++ b/saleor/graphql/core/utils/error_codes.py
@@ -44,7 +44,6 @@ class AccountErrorCode(Enum):
INVALID_PHONE_NUMBER = "invalid_phone_number"
INVALID_STOREFRONT_URL = "invalid_storefront_url"
INVALID_TOKEN = "invalid_token"
- NOT_USERS_ADDRESS = "not_users_address"
NULL = "null"
OBJECT_DOES_NOT_EXIST = "object_does_not_exist"
PASSWORD_ENTIRELY_NUMERIC = "password_entirely_numeric"
diff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphql
index f7f4a00956..64e6c55f86 100644
--- a/saleor/graphql/schema.graphql
+++ b/saleor/graphql/schema.graphql
@@ -52,7 +52,6 @@ enum AccountErrorCode {
INVALID_PHONE_NUMBER
INVALID_STOREFRONT_URL
INVALID_TOKEN
- NOT_USERS_ADDRESS
NULL
OBJECT_DOES_NOT_EXIST
PASSWORD_ENTIRELY_NUMERIC