HTTP not found error(404).

@param {String} [message]
@param {*} [cause]
@constructor
@memberOf errors
766229
function NotFound(message, cause) {
    NotFound.super_.call(this, message, StatusCode.NOT_FOUND, cause);
}
255367
function handlePreResponseError(server) {
        server.ext('onPreResponse', function (request, reply) {
            var response = request.response;
            var originalResponse = response;
            var msg;

            // No error, keep going with the reply as normal
            if (!response.isBoom) { reply.continue(); return; }

            // we need to convert to AppError if it is not already
            if (!(response instanceof AppError)) {
                msg = response.message || (response + '');

                // if legit 404 be sure to use that code (happens with not found in /dist on local)
                if (msg.indexOf('404:') >= 0 ||
                    (response.output && response.output.payload &&
                    response.output.payload.statusCode === 404)) {

                    response = new AppError({
                        code: 'not_found',
                        msg: 'The resource ' + request.url.path + ' was not found'
                    });
                }
                else {
                    msg = response.message || (response + '');
                    if (response.data) { msg += ' : ' + response.data; }

                    log.info(msg);

                    response = new AppError({
                        code: response.code || 'api_error',
                        msg: msg,
                        err: response
                    });
                }
            }

            var code = response.code || 'unknown_error';
            var err = errorDecoder[code] || errorDecoder['unknown_error'];
            var url = request.path;

            if (err.httpErrorCode === 404) {
                trackingService.pageNotFound({
                    caller: request.caller,
                    url: routeHelper.getBaseUrl(request.app.name) + url
                });
            }
            else {
                log.error(request.method + ' ' + url + ' (' + err.friendlyMessage + ')',
                    { err: originalResponse }   );
            }

            //TODO: this hack sucks, but needed quick way to display error page; do better!
            if (pancakes.getContainer() === 'webserver') {

                // hack fix for issue when error on trust site
                if (request.app && request.app.name === 'trust') {
                    reply().redirect(routeHelper.getBaseUrl('contact') + '?notify=loginFailure');
                }
                // else show error pages
                else {
                    var errUrl = err.httpErrorCode === 404 ? '/error404' : '/error500';
                    pancakes.processRoute({ request: request, reply: reply, urlOverride: errUrl, returnCode: err.httpErrorCode });
                }
            }
            else {
                reply(Boom.create(err.httpErrorCode, err.friendlyMessage));
            }
        });
    }
117490
function(err) {

        var message = 'Error occured while performing a JSON-WSP request. ' +
            err.message + '\n' +
            JSON.stringify({
                options : curOpts
            }, null, '  ').yellow;

        logger.error(message);
    }
96271
function notfoundUnit (server) {
  var regexes = [];
  var callbacks = [];

  function notfound (paths, literalCall) {
    regexes.push(RegExp(paths));
    callbacks.push(literalCall);
  }

  server.notfound = notfound;

  return function notfoundLayer (req, res) {
    res.statusCode = 404;
    var matched = null;
    var cbindex = -1;
    for (var i = 0; i < regexes.length; i++) {
      matched = req.path.match (regexes[i]);
      if (matched !== null) { cbindex = i; break; }
    }
    if (cbindex >= 0) {
      catchpath(req, res, matched, callbacks[cbindex], server.templateReader);
    } else {
      res.end('Not Found\n');
    }
  };
}
1245231
function getInvalidIncludesError (message) {
  var error = new Error(
    message || 'JSON API resource does not support `include`'
  )
  error.statusCode = statusCodes.BAD_REQUEST
  error.code = statusCodes.BAD_REQUEST
  error.status = statusCodes.BAD_REQUEST

  return error
}
1210381
function notFound( req, res, next ) {
        var err = new Error( 'Not Found' );
        err.status = 404;

        next( err );
    }
491978
function HttpError(message, code, description, response, captureStackTrace) {
  Error.call(this)

  // capture stack trace unless passed false
  if (captureStackTrace !== false) {
    Error.captureStackTrace(this, arguments.callee)
  }

  /*****************************************************************************
   * @property {xxx} code -- xxx
   */
  this.code = code || 500

  /*****************************************************************************
   * @property {string} description -- xxx
   */
  this.description = description || "InternalServiceError"

  /*****************************************************************************
   * @property {xxx} message -- xxx
   */
  this.message = message

  /*****************************************************************************
   * @property {xxx} response -- xxx
   */

  this.response = response
}
797732
function errors() {
        // handling 404 errors from config.express['404_redirect'] property
        if (config['404_redirect']) {
            server.use(function (req, res, next) {
                res.status(302)
                res.writeHead(302, { 'Location': config['404_redirect'] })
                res.end()
            })
        } else {
            server.use(function (req, res, next) {
                res.status(404).send({ message: 'not found' })
            })
        }

        if (errorHandlers.length) {
            for (let eh of errorHandlers) {
                server.use(wrapper(eh))
            }
        }

        //Default error handler
        server.use((err, req, res, next) => {
            if (!config.silent && !errorHandlers.length)
                app.drivers.logger.error('Unhandled server error', err)
            res.status(500)
               .json({
                   message: err.message,
                   stack: process.env.NODE_ENV === 'production' ? undefined : err.stack
               })
        })
    }
12956
function show_404($page = '', $log_error = TRUE)
	{
		$heading = "404 Page Not Found";
		$message = "The page you requested was not found.";

		// By default we log this, but allow a dev to skip it
		if ($log_error)
		{
			log_message('error', '404 Page Not Found --> '.$page);
		}

		echo $this->show_error($heading, $message, 'error_404', 404);
		exit;
	}
774510
protected void error(String message, Element source, Throwable cause) {
    logger.error(message);
  }
1374570
function HttpError(message, options) {
    // handle constructor call without 'new'
    if (!(this instanceof HttpError)) {
        return new HttpError(message, options);
    }

    HttpError.super_.call(this);
    Error.captureStackTrace(this, this.constructor);
    this.name = 'HttpError';
    this.message = message;
    this.status = 500;

    options = options || {};
    if (options.code)     { this.code = options.code; }
    if (options.errors)   { this.errors = options.errors; }
    if (options.headers)  { this.headers = options.headers; }
    if (options.cause)    { this.cause = options.cause; }
}
342864
def page_not_found(request, template_name="errors/404.html"):
    
    context = {
        "STATIC_URL": settings.STATIC_URL,
        "request_path": request.path,
    }
    t = get_template(template_name)
    return HttpResponseNotFound(t.render(context, request))
718739
function(params, callback) {
        /**
         * Callback for QB.chat.message.list()
         * @param {Object} error - The error object
         * @param {Object} messages - The messages object.
         * @callback listMessageCallback
         * */

        this.service.ajax({
            url: Utils.getUrl(MESSAGES_API_URL),
            data: params
        }, callback);
    }
1228492
function (args, callback) {
        ternserver.request({
            query: {
              type: "fixes", //$NON-NLS-1$
              file: args.meta.location,
              problemId: args.problemId,
              annotation: args.annotation,
              annotations: args.annotations
            },
            files: args.files
          },
          function (error, fixes) {
            if (error) {
              callback({request: 'fixes', error: error.message, message: Messages['failedToComputeFixes']}); //$NON-NLS-1$
            } else if (fixes && Array.isArray(fixes)) {
              callback({request: 'fixes', fixes: fixes}); //$NON-NLS-1$
            } else {
              callback({request: 'fixes', fixes: []}); //$NON-NLS-1$
            }
          }
        );
      }
737833
function makeHttpErrorClass(code, description) {
  /*****************************************************************************
   * @method C
   * @description C description
   * @param {string} message -- xxx
   * @param {xxx} response -- xxx
   * @returns {xxx} -- xxx
   */
  var C = function(message, response) {
    HttpError.call(this, message, code, description, response, false)
    Error.captureStackTrace(this, arguments.callee)
  }
  util.inherits(C, HttpError)
  C.code = code // Tag class with code as well for convenience

  return C
}
349980
function notFoundError(response, error) {
  var content = errorContentExt(ErrorType.invalidRequest, error);
  send(response, content, StatusCode.notFound);
}
106591
function HttpError(message, status, cause) {
    this.status = status || StatusCode.UNKNOWN;
    HttpError.super_.call(this, errors.ErrorCode.HTTP + this.status, message || StatusLine[this.status] || StatusLine[StatusCode.UNKNOWN], cause);
}