title: Third-party Javascript Error Handling
body: <p>I've been working on a 3rd party JavaScript API recently. I have a solid working architecture in place that covers most of the technical challenges involved apart from error handling.</p>
  
  <p>I went out and created my own onerror method based on <a href="https://github.com/Offbeatmammal/jsErrLog/" rel="nofollow">https://github.com/Offbeatmammal/jsErrLog/</a>. It works fine if my script is on the same domain as the client page but when I have it defined on a 3rd party I stop getting the line number and file path. Instead I just get:</p>
  
  <p><strong>Msg:</strong> Script error<br>
  <strong>File:</strong><br>
  <strong>Line:</strong> 0</p>
  
  <p>I've gone back and confirmed that this is also an issue for jsErrLog. The results can be seen @ <a href="http://jserrlog.appspot.com/report.html?sn=http%3A%2F%2Fapidemo.learnosity.dev" rel="nofollow">http://jserrlog.appspot.com/report.html?sn=http%3A%2F%2Fapidemo.learnosity.dev</a>. The lines with 0 as the line number or errors coming from a script loaded from another domain.</p>
  
  <p>Has anyone come across this issue and if so have you conquered it?</p>
  
  <p>Thanks,
  Denis</p>