I wanted to bulletproof some code by creating a local copy of my data and grabbing that local copy when the phone is offline (like when I’m on a plane).
I’ve thrown a “try” around my Request, but I get an error when I test (instead of failing over to the “catch”):
let req;
try{
req = await new Request(url);
}catch(e){
console.log("Offline mode");
}
I never get to the logged error, instead I get a “The Internet connection appears to be offline.”
Has anyone else encountered/solved this?