Bug fix: Default error handler silently fails for AJAX request with DEBUG>0 (Issue #599)