title: Firebase - Disable 'offline' mode and make 'update()' throw network exception?
body: <p>I am using <code>update()</code> to set the post likes and likes count. Currently, <code>update()</code> persists the data when offline. </p>
  
  <p>What I want - When the user is offline, they should not able to like the post. An appropriate network error message should be shown instead.</p>
  
  <p>Problem - <code>update()</code> is not throwing network exception and commits data to the server whenever the user gets online. </p>
  
  <p>Below is what I am doing currently: </p>
  
  <pre><code>db.child(nodepath).update(fanoutObj).then((){
          console.log("Data saved successfully.");
  }).catch(function(error) {
          console.log("Data could not be saved." + error);
  });
  </code></pre>
  
  <p><code>catch</code> is never called in case of no internet.</p>
  
  <p>Questions: </p>
  
  <ol>
  <li><p>Can I disable firebase offline mode and have it throw network exception on <code>update()</code> when there is no internet connection?</p></li>
  <li><p>Or should I check for network connection separately on button click?</p></li>
  </ol>