src/aria/modules/RequestMgr.js
function (res, args) {

            var resFromFilters = args.res;

            // set final error flag
            if (resFromFilters.errorData) {
                res.error = true;
            }

            // resFromFilters as precedence over handler response
            if (resFromFilters.data) {
                res.data = resFromFilters.data;
            }

            if (resFromFilters.errorData) {
                res.errorData = resFromFilters.errorData;
            }

            if (res.error) {
                var errorEvt = {
                    name : "error",
                    requestUrl : resFromFilters.requestUrl,
                    requestObject : args.requestObject,
                    errorData : res.errorData
                };

                // add HTTP errors if any
                if (resFromFilters.error) {
                    errorEvt.httpError = {
                        error : resFromFilters.error,
                        status : resFromFilters.status
                    };
                }
                this.$raiseEvent(errorEvt);
            }

            // finish by calling the requester callback
            this.$callback(args.cb, res, this.CALLBACK_ERROR);
        }
function (res, args) {

            var resFromFilters = args.res;

            // set final error flag
            if (resFromFilters.errorData) {
                res.error = true;
            }

            // resFromFilters as precedence over handler response
            if (resFromFilters.data) {
                res.data = resFromFilters.data;
            }

            if (resFromFilters.errorData) {
                res.errorData = resFromFilters.errorData;
            }

            if (res.error) {
                var errorEvt = {
                    name : "error",
                    requestUrl : resFromFilters.requestUrl,
                    requestObject : args.requestObject,
                    errorData : res.errorData
                };

                // add HTTP errors if any
                if (resFromFilters.error) {
                    errorEvt.httpError = {
                        error : resFromFilters.error,
                        status : resFromFilters.status
                    };
                }
                this.$raiseEvent(errorEvt);
            }

            // finish by calling the requester callback
            this.$callback(args.cb, res, this.CALLBACK_ERROR);
        }
function ( res , args ) { var resFromFilters = args . res ; // set final error flag if ( resFromFilters . errorData ) { res . error = true ; } // resFromFilters as precedence over handler response if ( resFromFilters . data ) { res . data = resFromFilters . data ; } if ( resFromFilters . errorData ) { res . errorData = resFromFilters . errorData ; } if ( res . error ) { var errorEvt = { name : "error" , requestUrl : resFromFilters . requestUrl , requestObject : args . requestObject , errorData : res . errorData } ; // add HTTP errors if any if ( resFromFilters . error ) { errorEvt . httpError = { error : resFromFilters . error , status : resFromFilters . status } ; } this . $raiseEvent ( errorEvt ) ; } // finish by calling the requester callback this . $callback ( args . cb , res , this . CALLBACK_ERROR ) ; }
After handler processing, raise error event if needed and call the callback given when the request was issued
@protected
@param {aria.modules.RequestBeans:ProcessedResponse} res final resource for the user
@param {Object} args
After handler processing raise error event if needed and call the callback given when the request was issued