title: Look for errors
body: <p>Is there a way in Javascript to trigger a method when there is an error in the console?</p>
  
  <p>I want to show a textbox on screen when there is an error in the API and <code>jquery</code> gives an automated message in the console for this.</p>
  
  <p>I don't need to fetch the message, I just want to know when there is an error in the console.</p>