Stolen from this answer:
chrome.webRequest.onErrorOccurred.addListener(onErrorOccurred, {urls: ["http://*/*", "https://*/*"]});
function onErrorOccurred(details)
{
if (details.error == "net::ERR_NAME_NOT_RESOLVED") // change this ERR to whatever
chrome.tabs.update(details.tabId, {url: "..."});
}