Some of our customers are reporting that they are unable to execute some javascript actions. Our error data collecting is on the server and when javascript breaks we are unable to get notified it since ajax calls can't be run before page refresh.
Is there a way to collect javascript errors on client side and send them to the server as soon as javascript is running fine again.
Example:
- User goes to page a.php.
- There's faulty javascript on a.php and it breaks user's javascript.
- User's client logs the errors and stores it locally.
- User goes to page b.php.
- There are no faulty javascript on b.php and the client detects that there's javascript error logs stored locally and proceeds to send them to the server.
- The server writes the log up.