Improve page not found or error handling code
Improve page not found or error handling code

Optimise `chrome.webRequest.onErrorOccurred.addListener` and
`chrome.webRequest.onCompleted.addListener`.

internetarchive/wayback-machine-chrome,internetarchive/wayback-machine-chrome