PRD-3965 adding validation and exception handling for PRD templates MongoDb source