title: how to catch error in firestore when no internet
body: <p>I recently updated my app from firebase to firestore but stuck at offline persistance. I am using react-native-firebase to integrate firestore and disable its perisistance but still not getting any catch error when no internet.
  This is my code to delete data but catch never gets error when no internet not is the promise resolved.</p>
  
  <pre><code>firebase.firestore().collection('d').doc(deviceid).delete().then(function () {
                                      console.log("Device Deleted");
                                      that.setState({
                                          loading: false
                                      });
                                      Toast.show('Device Deleted Succesfully', {
                                          duration: Toast.durations.SHORT,
                                          position: Toast.positions.TOP,
                                          shadow: true,
                                          animation: true,
                                          hideOnPress: true,
                                          delay: 0,
                                      });
  
                                  }).catch(function (err) {
                                      console.log(err);
                                      that.setState({
                                          loading: false
                                      });
                                  })
  </code></pre>