If an exception occurs while processing an Ajax request and the application
is in development mode, the exception
stackTrace is returned to the browser.
If an exception occurs while processing an Ajax request and the application
is in production mode, a simple error message is returned.