There are cases where we observe JavaScript errors, and the experience is like opening the Developer Tool in the browser and check the log in the Console. When the problem resides on the user, it is not easy to guide them to perform this action. To overcome this problem, there is a need for JavaScript error collector function. When we call this function, it should collect all JavaScript error log files and send them as a list. Then the developer would be able to use it to troubleshoot issues and also could implement interface like collect and store JavaScript error log files. It is recommended the error collector support the following data:
Location: the page leads to error.
Date and Time: with ability to customize it like set a time zone or default to match server.
Error message: Complete error message in the client
User: In case user login to the page
Browser-Agent Data: information about user's browser, operating system ...