Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AngularJS: catch error stack on production

I run my site on AngularJS and use New Relic JS errors notifications to detect errors.

I want to fix major errors, and basically did it. But I can't reproduce one error that can be logged on any page of site:

Stack trace
UncaughtException: Script error.
    in evaluated code

I tried to visit those pages with the same browser, with low-speed connection, on Mac, Windows, Ubuntu as New Relic logged. But it didn't make sense.

So, my question is there any technique that can help me to catch this error or extend information about it? It can be common JS technique or AngularJS specific.

like image 836
dubadub Avatar asked Jun 20 '14 09:06

dubadub


1 Answers

The "Script error" message is one that it's difficult to get more details on, because the error occurred before New Relic's Javascript monitoring was able to wrap any of the script's functions. This can commonly occur during script loading, or it may mean that the error occurs during an interaction with a browser plugin or extension, or from an inline event handler.

like image 116
Alexis Avatar answered Nov 07 '22 22:11

Alexis