u
This commit is contained in:
@@ -71,7 +71,8 @@ function articleErrorStatus(error) {
|
|||||||
if (error.message === 'Invalid categoryIds') return 400;
|
if (error.message === 'Invalid categoryIds') return 400;
|
||||||
if (error.message === 'Attribute name not found') return 404;
|
if (error.message === 'Attribute name not found') return 404;
|
||||||
if (error.message === 'attributeNameId is required to become a father article') return 400;
|
if (error.message === 'attributeNameId is required to become a father article') return 400;
|
||||||
if (error.message === 'A child article cannot become a father') return 400;
|
if (error.message?.includes('already used by an ancestor father')) return 400;
|
||||||
|
if (error.message?.includes('cannot have attribute values for its variant attribute')) return 400;
|
||||||
if (error.message === 'Cannot disable father mode on an article that still has children') return 400;
|
if (error.message === 'Cannot disable father mode on an article that still has children') return 400;
|
||||||
if (error.message === 'Article is not a father article') return 400;
|
if (error.message === 'Article is not a father article') return 400;
|
||||||
if (error.message === 'Attribute value is required for child article' || error.message === 'Attribute value is required') return 400;
|
if (error.message === 'Attribute value is required for child article' || error.message === 'Attribute value is required') return 400;
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ function articleAttributeValueErrorStatus(error) {
|
|||||||
if (error.message === 'Company not found' || error.message === 'Article not found') return 404;
|
if (error.message === 'Company not found' || error.message === 'Article not found') return 404;
|
||||||
if (error.message?.startsWith('Attribute value not found')) return 404;
|
if (error.message?.startsWith('Attribute value not found')) return 404;
|
||||||
if (error.message?.includes('exclusive')) return 400;
|
if (error.message?.includes('exclusive')) return 400;
|
||||||
|
if (error.message?.includes('father article') || error.message?.includes('Child article must have')) return 400;
|
||||||
if (error.message === 'Invalid attribute values array' || error.message === 'Invalid attributeValueId' || error.message === 'Duplicate attributeValueId') return 400;
|
if (error.message === 'Invalid attribute values array' || error.message === 'Invalid attributeValueId' || error.message === 'Duplicate attributeValueId') return 400;
|
||||||
return 500;
|
return 500;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user