function getQueue(queue_id) { return new Promise(async(resolve, reject)=>{ /* Here I make a request to api point * / if(statusCode == 2) { reject(); } else { await getQueue(queue_id); /* That's exactly where you need to call the same function recursively * / } }); }
Description
No problem..