Fires when a Network or HTTP error occured during fetch
Fetcher.addEventListener('error', (error) => { if (error.response && error.response.status === 401) { console.error( `Unauthorized to access resource ${error.response.url}: ${error.message}`, error, ); } else { console.error('Got an error while fetching resource', error); }}); Copy
Fetcher.addEventListener('error', (error) => { if (error.response && error.response.status === 401) { console.error( `Unauthorized to access resource ${error.response.url}: ${error.message}`, error, ); } else { console.error('Got an error while fetching resource', error); }});
Fires when a Network or HTTP error occured during fetch