Error when attempting $http.get without a connection


#1

I was testing out what happens when my app trys to access an API when the API is unavailable or the user’s connection is down (without checking navigator.network.connection.type).

I get this exception from ADB
D/CordovaLog(20126): file:///android_asset/www/lib/ionic/js/ionic.bundle.js: Line 18316 : TypeError: Cannot read property ‘data’ of undefined
D/CordovaLog(20126): at file:///android_asset/www/lib/ionic/js/ionic.bundle.js:16457:22
D/CordovaLog(20126): at wrappedCallback (file:///android_asset/www/lib/ionic/js/ionic.bundle.js:19846:81)
D/CordovaLog(20126): at file:///android_asset/www/lib/ionic/js/ionic.bundle.js:19932:26
D/CordovaLog(20126): at Scope.$eval (file:///android_asset/www/lib/ionic/js/ionic.bundle.js:20858:28)
D/CordovaLog(20126): at Scope.$digest (file:///android_asset/www/lib/ionic/js/ionic.bundle.js:20684:31)
D/CordovaLog(20126): at Scope.$apply (file:///android_asset/www/lib/ionic/js/ionic.bundle.js:20964:24)
D/CordovaLog(20126): at done (file:///android_asset/www/lib/ionic/js/ionic.bundle.js:16722:45)
D/CordovaLog(20126): at completeRequest (file:///android_asset/www/lib/ionic/js/ionic.bundle.js:16923:7)
D/CordovaLog(20126): at <error: Error: INVALID_STATE_ERR: DOM Exception 11>

platform:
Android 4.3
Latest Ionic