Normally when an exception is thrown, Error controller takes command and displays error page with regular common header and footer.
This behavior is not wanted in Ajax request. Because in case of error, whole html page is sent over. And in cases where I'm directly loading the content of http response in a div, this is even more unwanted.
Instead in case of Ajax request, I just want to receive 'the actual error' thrown by exception.
How can I do this?
I think, one dirty way could be: set a var in ajax request and process accordingly. Not a good solution.