I went through [Spring exception handling documentation](https://spring.io/blog/2013/11/01/exception-handling-in-spring-mvc) and I didn't grasp the idea how to deal with ajax calls unhandled exeptions. 

What would be convinient method to handle both page request unhandled exceptions and ajax calls unhandled exceptions in one application? 

This could be a problem since global exception handler also catch ajax calls and return 'dedicated error page' with lots of stuff and thus prevent to deliver slim error reply for the ajax error callback.