src/aria/core/transport/BaseXHR.js
function (reqId, connection, callback) {
            var httpStatus, responseObject;

            try {
                var connectionStatus = connection.status;
                if (connectionStatus) {
                    httpStatus = connectionStatus || 200;
                } else if (!connectionStatus && connection.responseText) {
                    // Local requests done with ActiveX have undefined state
                    // consider it successfull if it has a response text
                    httpStatus = 200;
                } else if (connectionStatus == 1223) {
                    // Sometimes IE returns 1223 instead of 204
                    httpStatus = 204;
                } else {
                    httpStatus = 13030;
                }
            } catch (e) {
                // 13030 is a custom code to indicate the condition -- in Mozilla/FF --
                // when the XHR object's status and statusText properties are
                // unavailable, and a query attempt throws an exception.
                httpStatus = 13030;
            }

            var error = false;
            if (httpStatus >= 200 && httpStatus < 300) {
                responseObject = this._createResponse(connection);
            } else {
                responseObject = {
                    error : [httpStatus, connection.statusText].join(" "),
                    responseText : connection.responseText,
                    responseXML : connection.responseXML
                };

                error = true;
            }

            responseObject.status = httpStatus;

            callback.fn.call(callback.scope, error, callback.args, responseObject);

            connection = null;
            responseObject = null;
        }
function (reqId, connection, callback) {
            var httpStatus, responseObject;

            try {
                var connectionStatus = connection.status;
                if (connectionStatus) {
                    httpStatus = connectionStatus || 200;
                } else if (!connectionStatus && connection.responseText) {
                    // Local requests done with ActiveX have undefined state
                    // consider it successfull if it has a response text
                    httpStatus = 200;
                } else if (connectionStatus == 1223) {
                    // Sometimes IE returns 1223 instead of 204
                    httpStatus = 204;
                } else {
                    httpStatus = 13030;
                }
            } catch (e) {
                // 13030 is a custom code to indicate the condition -- in Mozilla/FF --
                // when the XHR object's status and statusText properties are
                // unavailable, and a query attempt throws an exception.
                httpStatus = 13030;
            }

            var error = false;
            if (httpStatus >= 200 && httpStatus < 300) {
                responseObject = this._createResponse(connection);
            } else {
                responseObject = {
                    error : [httpStatus, connection.statusText].join(" "),
                    responseText : connection.responseText,
                    responseXML : connection.responseXML
                };

                error = true;
            }

            responseObject.status = httpStatus;

            callback.fn.call(callback.scope, error, callback.args, responseObject);

            connection = null;
            responseObject = null;
        }
function ( reqId , connection , callback ) { var httpStatus , responseObject ; try { var connectionStatus = connection . status ; if ( connectionStatus ) { httpStatus = connectionStatus || 200 ; } else if ( ! connectionStatus && connection . responseText ) { // Local requests done with ActiveX have undefined state // consider it successfull if it has a response text httpStatus = 200 ; } else if ( connectionStatus == 1223 ) { // Sometimes IE returns 1223 instead of 204 httpStatus = 204 ; } else { httpStatus = 13030 ; } } catch ( e ) { // 13030 is a custom code to indicate the condition -- in Mozilla/FF -- // when the XHR object's status and statusText properties are // unavailable, and a query attempt throws an exception. httpStatus = 13030 ; } var error = false ; if ( httpStatus >= 200 && httpStatus < 300 ) { responseObject = this . _createResponse ( connection ) ; } else { responseObject = { error : [ httpStatus , connection . statusText ] . join ( " " ) , responseText : connection . responseText , responseXML : connection . responseXML } ; error = true ; } responseObject . status = httpStatus ; callback . fn . call ( callback . scope , error , callback . args , responseObject ) ; connection = null ; responseObject = null ; }
Attempts to interpret the server response and determine whether the transaction was successful, or if an
error or exception was encountered.
@private
@param {Number} reqId Requst identifier
@param {Object} connection The connection object (XHR or ActiveX)
@param {aria.core.CfgBeans:Callback} callback Callback from aria.core.IO
Attempts to interpret the server response and determine whether the transaction was successful or if an error or exception was encountered .