You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like the intention was to call the callback function for error handling if a URL string was passed to unzip. However if there is an error like 404 (Not Found), there is still an error thrown on the xhr.send() line.
I think that to properly catch the error, you need to add a handler like this: xhr.addEventListener('error', handleEvent); since the error is asynchronous and the try block has already successfully executed the send() command before the error is generate.
The text was updated successfully, but these errors were encountered:
It looks like the intention was to call the callback function for error handling if a URL string was passed to unzip. However if there is an error like 404 (Not Found), there is still an error thrown on the
xhr.send()
line.try { xhr.open('GET', source) xhr.responseType = 'blob' xhr.send() } catch (err) { callback(err) }
I think that to properly catch the error, you need to add a handler like this:
xhr.addEventListener('error', handleEvent);
since the error is asynchronous and the try block has already successfully executed the send() command before the error is generate.The text was updated successfully, but these errors were encountered: