Create the endpoint to receive the errors
In his course Craig sets this up with a web API end point but I’m going to use a MVC controller action method. The code here has 3 main parts:
- The ErrorInputModel
- The client side exception
- The end point to post the exception too.
To use this method you would simple post data that conforms the the ErrorInputModel to the address <site path>/error/record.
Hook onto the onError event and post it to the endpoint you set up above
As you can see it simply builds up the error input model and posts it to the mvc action method.
I hope you find that useful.