The below code snippet explains how to parse the jQuery AJAX error responseText to JSON object so that its Attributes can be easily read.
<script type = "text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type = "text/javascript">
    $("#demo").live("click", function () {
        $.ajax({
            url: 'Test.aspx/Test',
            type: 'POST',
            dataType: 'json',
            contentType: 'application/json; charset=utf-8',
            success: function (data) {
                   
            },
            error: function (response) {
                var r = jQuery.parseJSON(response.responseText);
                alert("Message: " + r.Message);
                alert("StackTrace: " + r.StackTrace);
                alert("ExceptionType: " + r.ExceptionType);
            }
        });
    });
</script>
<input type = "button" id = "demo" value = "Demo" />
 
Explanation:
Above on the click of the button with ID demo a jQuery AJAX call is made to URL. The error or exceptions occurring during this jQuery AJAX call are captured in the error event handler. jQuery stores the error information in the responseText object in a JSON string format. To convert it to a JSON object jQuery.parseJSON method is used. And later the object attributes are displayed via alert.