u
This commit is contained in:
@@ -16,6 +16,7 @@ function attributeValueErrorStatus(error) {
|
||||
if (error.message === 'Value required') return 400;
|
||||
if (error.message === 'Invalid attribute value order') return 400;
|
||||
if (error.message === 'Invalid id' || error.message === 'Invalid attributeId') return 400;
|
||||
if (error.message === 'Attribute value already exists') return 409;
|
||||
if (error.message === 'Attribute value in use' || error.message?.includes('FOREIGN KEY constraint')) return 409;
|
||||
return 500;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user