3 Best Free Online Games to Help Chill You Out

How to check(user created collections) Collections.insert() is Successfully Inserted or not in Meteor JS ?. For example I am using the Client Collections to insert details as shown below:

Client.insert({ name: "xyz", userid: "1", care:"health" });

How to know the above insert query is successfully inserted or not?. Because of the below problem

 If the form details are successfully inserted  - do one action
  else -another action

So Please suggest me what to do?

Mongo.Collection#insert(doc, [callback])

callback Function
Optional. If present, called with an error object as the first argument and, if no error, the _id as the second.

If you provide a callback, Meteor will call that function with error and result arguments. In an error case, result is undefined. If the insert is successful, error is undefined and result is the new document ID.