constdelayReport=deplayMs=>newPromise((resolve)=>{setTimeout(resolve,deplayMs);});setIntervalAsync(async()=>{try{constseed=Math.floor((Math.random()*100)+1);if(seed%2===0){console.log(newDate());awaitdelayReport(500);}else{thrownewError('get a random error');}}catch(e){console.error(e);}},1000);
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
And handle errors: