Return BAD_FIELD if dataDir conflicts
This commit is contained in:
@@ -380,6 +380,10 @@ function getDuplicateErrorDetails(errorMessage, location, domainObject, portBind
|
||||
if (portBindings[portName] === parseInt(match[1])) return new AppsError(AppsError.ALREADY_EXISTS, `Port ${match[1]} is reserved`, { portName });
|
||||
}
|
||||
|
||||
if (match[2] === 'dataDir') {
|
||||
return new AppsError(AppsError.BAD_FIELD, `Data directory ${match[1]} is in use`, { field: 'dataDir' });
|
||||
}
|
||||
|
||||
return new AppsError(AppsError.ALREADY_EXISTS, `${match[2]} '${match[1]}' is in use`);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user