title: Laravel Echo error handling (with Pusher)
body: <p>Is there any guide about this topic? I have read the <a href="https://pusher.com/docs/client_api_guide/client_connect#connection-states" rel="nofollow noreferrer">pusher documentation</a> and it seems fairly easy to manage a disconnect with a code similar to the following:</p>
  
  <pre><code>pusher.connection.bind('disconnected', function() {
      // Do Something
  })
  </code></pre>
  
  <p>I'm not sure how to integrate it with Echo, since my code is as follows:</p>
  
  <pre><code>window.EchoConnection = new Echo({
      broadcaster: 'pusher',
      key: window.EchoKey,
      cluster: 'eu',
      encrypted: true
  });
  </code></pre>
  
  <p>EDIT: in order to check a disconnect event, run <code>window.EchoConnection.connector.pusher.connection.disconnect()</code> in your console</p>