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
Is it possible to log the error in the catch to see where is the source of the failed internet connection?
In my case, it happens something really weird. It seems to enter both the .then and the .catch methods. But actually I'm having an internet connection (verified).
Here is the code:
var onlineCheck = function(timeout_, retires_, callback) {
internetAvailable({
// Provide maximum execution time for the verification
timeout: timeout_,
// If it tries 5 times and it fails, then it will throw no internet
retries: retires_
}).then(() => {
console.log("INTERNET AVAILABLE");
callback();
}).catch(() => {
console.log("NO INTERNET");
});
}
Is it possible to log the error in the catch to see where is the source of the failed internet connection?
In my case, it happens something really weird. It seems to enter both the .then and the .catch methods. But actually I'm having an internet connection (verified).
Here is the code:
function call from app.js:
I recieve both messages in the console: INTERNET AVAILABLE and NO INTERNET.
That's why I would like to know if there is a way to log more information when catching.
Thank you!
The text was updated successfully, but these errors were encountered: