Corrected mistake in the promise call to reject a promise