You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
throwobsrvError(dataset_id,"DATASET_NOT_EXISTS",`Dataset does not exists with id:${dataset_id}`,"NOT_FOUND",404);
25
+
}
26
+
27
+
if(action==="attach"){
28
+
if(_.get(dataset,"alias")){
29
+
throwobsrvError(dataset_id,"DATASET_ALIAS_EXISTS",`Dataset already has alias '${_.get(dataset,"alias")}' associated with it. Please detach the existing alias and try again`,"BAD_REQUEST",400);
30
+
}
31
+
32
+
constdatasetList=awaitdatasetService.findDatasets({[Op.or]: [{dataset_id: alias},{name: alias},{ alias }]},["id"]);
throwobsrvError(dataset_id,"DATASET_ALIAS_NOT_UNIQUE",`Dataset alias must be unique. The alias '${alias}' cannot be the same as the dataset id, dataset name or alias name of any other dataset.`,"BAD_REQUEST",400);
36
+
}
37
+
}
38
+
39
+
if(action==="detach"){
40
+
constexistingAliasName=_.get(dataset,"alias")
41
+
if(!existingAliasName){
42
+
throwobsrvError(dataset_id,"DATASET_ALIAS_NOT_EXISTS",`Dataset '${dataset_id}' does not have any alias associated with it`,"BAD_REQUEST",400);
0 commit comments