Make ffx blink on TUNNEL CONN FAILED (but popup doesn't show error)

This commit is contained in:
ilyaigpetrov 2020-10-18 16:27:57 +00:00
parent a12621635b
commit 5287510263

View File

@ -4,9 +4,12 @@
const timeouted = window.utils.timeouted;
const proxySideErrors = [
'net::ERR_TUNNEL_CONNECTION_FAILED',
];
const isProxySideError = (details) =>
/* About !main_frame: Main frame websocket errors are followed by webnavigation errors
which chrome-internals code resets the state of the popup.
*/
details.error === 'net::ERR_TUNNEL_CONNECTION_FAILED' && details.type !== 'main_frame' ||
details.error === 'NS_ERROR_CONNECTION_REFUSED' && Boolean(details.proxyInfo);
const urlToA = (url) => new URL(url).host.link(
encodeURIComponent(url),
@ -14,9 +17,7 @@
const isProxyErrorHandledAsync = async (details) => {
if (!proxySideErrors.includes(details.error) || details.type === 'main_frame') {
// Main frame websocket errors are followed by webnavigation errors
// which chrome-internals code resets the state of the popup.
if (!isProxySideError(details)) {
return;
}
let fromPageHref = '';