Promisify contests.js file, add error if there are no promises