error handle in mongo