Earlier, I had: training_status <- training_status$find(query = '{"TrainingStatus" : "running"}')
I made the variable 'training_status' with the same name as the connection object of the MongoDB server. So I ran my plumber script, it didn't find training_status$find
I changed the variable name in plumber script to say, status and it worked then.