title: How to handle server down requests (AngularJS)
body: <p>I'm making a POST request to a TOMCAT server using AngularJS. Below is a snippet of that code.</p>
  
  <pre><code>$http(&lt;myRequest&gt;).then(function(response) {
              $scope.info = response.data;
          }, function(response) {
              $scope.error = response.data
          });
  </code></pre>
  
  <p>This works fine as long as the server is up and running. In case of any error on the response, it populates the <code>$scope.error</code> variable with the error message. However, if the server is down, when I click the link that makes this request nothing is shown on the page, I can only see the error on the <strong>console</strong> of the browser.</p>
  
  <p>How do I show this error on the page? I want to somehow notify the user that the server is down.</p>