FUNCTION: onError( error )
Callback invoked if an error is encountered while making a request.

@private
@param {Error} error - error object
488019
function onError( error ) {
		self.req.error = error;
		if ( process.connected ) {
			// TODO: log (or not; serialize in output message?)
			console.error( process.pid, 'request', error );
		}
	}
640008
function (error, response) {
        if (!_.isNull(error)) {
            error = _.createError(error);
        } else if (!_.isNull(response) && (response.status >= 400 || response.status === 0)) {
            error = _.createError(null, response);
            response = null;
        }
        callback(error, response);
    }
924120
function handleError(res) {
  return function (err) {
    if (err.status && err.name !== 'NotFoundError') {
      // If we're in this block, the error has a defined `status` property and
      // the error should be directed out immediately
      sendDefaultResponseForCode(err.status, err.message, res);
    } else if (err.name === 'NotFoundError' ||
      err.message.indexOf('ENOENT') !== -1 ||
      err.message.indexOf('not found') !== -1) {
      notFound(err, res);
      // if the word "client" is ever in a message, it should be for the client.  We enforce that here.
    } else if (err.message.indexOf('Client') !== -1) {
      clientError(err, res);
    } else {
      serverError(err, res);
    }
  };
}
1119179
function error() {
                reject(new TypeError());
                doc.removeEventListener(api.events.error, error, false);
            }
580100
function handleError(err) {
  if (typeof err === 'string' && errors[err]) {
    console.error(errors[err]);
  } else {
    if (argv.verbose) {
      console.error(err.stack);
    } else {
      console.error(err.message);
    }
  }
  process.exit(1);
}
162924
function(error) {
      this.errors.push(error);

      for (var i = 0, length = this.handlers.length; i < length; i++) {
        this.handlers[i](error);
      }
    }
215910
function onError(err) {
    if (!retries.length) return reject(err);
    setTimeout(()=>fn().then(resolve, onError), retries.shift());
  }
72460
function(err, model, response, options){
  if (options.cb){
    options.cb(err, model, response);
  }
  if (err){
    model.trigger('error', err, model, options);
  }
}
182493
function errorHandler(response) {
        if (response) {
          var errorData = _buildError(xhr, url, method, response);
          Logger.error(errorData);

          if (errorCallback) {
            Logger.warnCallbackDeprecation();
            errorCallback(errorData);
          }
          reject(errorData);
        }
      }
889153
function onError(err) {
    // jshint validthis: true
    notifier.notify({
        title: err.plugin + ' Error',
        message: err.message
    });
    $.util.log(err.toString());
    $.util.beep();
    if (isWatching) {
        this.emit('end');
    } else {
        process.exit(1);
    }
}
38493
function onError (fn) {
  callbacks.push(fn);
  if (window.onerror != handler) {
    callbacks.push(window.onerror);
    window.onerror = handler;
  }
}
113497
function processError (error) {
    if (_cb.beforeReturnError) { _cb.beforeReturnError(error); }
    if (_cb.returnError) { _cb.returnError(error, response); }
    if (_cb.afterReturnError) { _cb.afterReturnError(error); }
  }
1169982
function defaultErrorHandler(err, req, res) {
  if (err.name === 'UnauthorizedError') { // authentication is expected to be a common use-case
    res.status(401).end();
  } else {
    if (!err.status || err.status >= 500) {
      console.error(err.stack || err.toString());
    }
    res.status(err.status || 500).json({message: err.message})
  }
}
490054
function(error) {
		var that = this,
			param = this.chainParameter,
			stopPointer = {},
			utils = {
				stop: null,
				url: this.scraper.url,
				scraper: this,
				params: param,
				lastReturn: undefined
			},
			keep = true;
		this.chainParameter = null;

		if (error) {
			this.errorCallback(error, utils);
			this.doneCallback(utils);
			return;
		}

		async.eachSeries(this.promises, function dispatcher(fn, callback) {
			var done = function(err, lastReturn) {
				utils.lastReturn = lastReturn;
				if (err === stopPointer) {
					keep = false;
					callback(err);
				} else if (err) {
					callback(err);
				} else if (keep) {
					callback();
				}
			};
			utils.stop = function() {
				done(stopPointer, null);
			};

			try {
				fn.call(that, done, utils);
			} catch (err) {
				done(err, null);
			}
		}, function(err) {
			utils.stop = null;
			if (err && err !== stopPointer) {
				that.errorCallback(err, utils);
			}
			that.doneCallback(utils.lastReturn, utils);
			that.scraper.close();
		});
	}
207359
function (err, req, res) {
    console.error('uncaughtError', req.method + ' ' + req.url);
    this.sendErrorReport(err, req);

    if (req.accepts('html')) {
      this.renderErrorPage('error', err, req, res);
    } else {
      var error = new errors.HTTPError(500, 'Internal Server Error');
      this.renderError(error, req, res);
    }
  }
75133
function error(err, req, res, next) {
  // log it
  if (!test) console.error(err.stack);

  // respond with 500 "Internal Server Error".
  res.status(500);
  res.send('Internal Server Error');
}
262247
function onClientError(err) {
    // Ignore ECONNRESET errors
    if ((err || {}).errno !== 'ECONNRESET') {
      log.error('An unhandled error occured when searching for the root DSE at "%s". Error: %j', url, err);
      if (hasEvents.call(self, 'error')) self.emit('error', err)
    }
  }