Another person asked my exact question here with no answer: Angular 2 Client Side Errors
I'm wanting a way (avoiding additional third party frameworks if possible) to send my client-side Angular errors to my back end exception logger.
My back end is just a .NET Web API project that's connected to our SQL Server database. My server side errors are currently being logged to the database by calling a stored procedure controller whenever a server error occurs (I used KudVenKat's tutorial to build this: http://csharp-video-tutorials.blogspot.com/2012/12/logging-exception-to-database-part-75.html).
Is there a way to write an Angular service which calls my ErrorLogger API to log my Angular errors to the database?
I figure I may have to tweak my back end logger controller since it's using .NET's System.Exception class, which I'm guessing is only good for detecting server side exceptions, not Angular's. I may need an entirely different logger controller and database table for client side errors only - but I'd like server and client side errors logged to the same table if possible.
Knowing this - is what I'm trying to do even a good approach? If not, can anyone give me a high level description of how I might go about logging these client side errors instead?
if (client error) do this, if (server error) do thislogic. Other than sending the error to my back end, I don't know of a way to directly send errors from Angular to a SQL Server table, which is where we are wanting to store these errors.