if (activePollingRef.current && maxRetries !== null && functionToPoll) {
        let retries = 0
        let result: Payload[] | undefined | null

        const pollDivinersWithDelayInner = async (newDelay: number) => {