Skip to content

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

Drop ProductAttributeError

IKarbowiake87b82d88a9a
diff --git a/saleor/graphql/core/types/common.py b/saleor/graphql/core/types/common.py
index 8c346eb41c..18f3ad73e7 100644
--- a/saleor/graphql/core/types/common.py
+++ b/saleor/graphql/core/types/common.py
@@ -162,14 +162,6 @@ class ProductError(Error):
)
-class ProductAttributeError(ProductError):
- attributes = graphene.List(
- graphene.NonNull(graphene.ID),
- description="List of attributes IDs which causes the error.",
- required=False,
- )
-
-
class BulkProductError(ProductError):
index = graphene.Int(
description="Index of an input list item that caused the error."
diff --git a/saleor/graphql/product/mutations/attributes.py b/saleor/graphql/product/mutations/attributes.py
index b4f04ee050..27f58c4041 100644
--- a/saleor/graphql/product/mutations/attributes.py
+++ b/saleor/graphql/product/mutations/attributes.py
@@ -10,7 +10,7 @@ from ....core.permissions import ProductPermissions
from ....product import AttributeInputType, models
from ....product.error_codes import ProductErrorCode
from ...core.mutations import BaseMutation, ModelDeleteMutation, ModelMutation
-from ...core.types.common import ProductAttributeError, ProductError
+from ...core.types.common import ProductError
from ...core.utils import (
from_global_id_strict_type,
validate_slug_and_generate_if_needed,
@@ -295,7 +295,7 @@ class AttributeAssign(BaseMutation):
class Meta:
description = "Assign attributes to a given product type."
- error_type_class = ProductAttributeError
+ error_type_class = ProductError
error_type_field = "product_errors"
@classmethod
diff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphql
index ba7d271f60..11c90334dd 100644
--- a/saleor/graphql/schema.graphql
+++ b/saleor/graphql/schema.graphql
@@ -412,7 +412,7 @@ type Attribute implements Node & ObjectWithMetadata {
type AttributeAssign {
errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")
productType: ProductType
- productErrors: [ProductAttributeError!]!
+ productErrors: [ProductError!]!
}
input AttributeAssignInput {
@@ -3667,13 +3667,6 @@ type Product implements Node & ObjectWithMetadata {
isAvailableForPurchase: Boolean
}
-type ProductAttributeError {
- field: String
- message: String
- code: ProductErrorCode!
- attributes: [ID!]
-}
-
type ProductBulkDelete {
errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")
count: Int!