title: how to get the explanation of the error in websockets
body: <p>I am new to websockets and I try to hanlde the errors they throw.</p>
  
  <p>I have something like</p>
  
  <pre><code>websock.onerror=function (evt) 
   { alert(the reason it falied is...);}
  </code></pre>
  
  <p>How can I get the explanation of the error? </p>
  
  <p>For example the console says "you cannot delete that because of restrictions in db". </p>
  
  <p>How can I get this and display it to the user instead of just alerting "Error deleting"?</p>