Skip to content

Commit 1545bdc

Browse files
committed
add better error when duplicate user was found
1 parent fd5edd4 commit 1545bdc

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

OpenFlow/src/DatabaseConnection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ export class DatabaseConnection {
500500
var r: Role = (item as any);
501501
if (r.name == null || r.name == "") { throw new Error("Name is mandatory"); }
502502
var exists2 = await Role.FindByName(r.name);
503-
if (exists2 != null) { throw new Error("Access denied"); }
503+
if (exists2 != null) { throw new Error("Access denied, adding new user"); }
504504
}
505505

506506
// var options:CollectionInsertOneOptions = { writeConcern: { w: parseInt((w as any)), j: j } };

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.0.438
1+
0.0.439

0 commit comments

Comments
 (0)