In my extension I'm trying to attach debugger for given tabId, Here is my code
if(!attachedTabIds.includes(tabId)) {
    chrome.debugger.attach({ tabId: tabId }, version, function(){
        ...
    })
}
So from time to time I'm getting this error
I tried to wrap it with try/catch block but it didn't work.
try {
    chrome.debugger.attach({ tabId: tabId }, version, function(){
        ...
    })
} catch(e){
    console.log('e', e)
}
SO how can I handle this error ?

 
    