db.createUser( { user: "manifmaker",
    pwd: "manifmaker",
    roles: [ "readWrite", "dbAdmin" ]
});
@@ -1,8 +1,15 @@
+try%7B %0A%09
 db.creat
@@ -33,24 +33,25 @@
 anifmaker%22,%0A
+%09
     pwd: %22ma
@@ -61,16 +61,17 @@
 maker%22,%0A
+%09
     role
@@ -104,7 +104,187 @@
 %22 %5D%0A
+%09
 %7D);
+%0A%7D catch (e)%7B%0A%09print(e);%0A%09if(e.message.indexOf(%22already exists%22) !== -1)%0A%09%09print(%22Existing user is not an error%22);%0A%09else %7B%0A%09%09print(%22Throw error from Mongo script%22)%0A%09%09throw e;%0A%09%7D%0A%7D

deploy (create mongo user) : catch createUser user already existing error error