This commit is contained in:
seb
2026-09-29 18:48:13 +02:00
parent 63af77eab3
commit 79b48c5d47
2 changed files with 3 additions and 1 deletions

View File

@@ -27,6 +27,7 @@ function articleAttributeValueErrorStatus(error) {
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?.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;
return 500;
}