MCPcopy Create free account
hub / github.com/fastify/fastify / routeNotFound

Method routeNotFound

lib/log-controller.js:118–123  ·  view source on GitHub ↗

* Logs a "route not found" message at `info` level. * Used by the default 404 handler. * * @param {object} request Fastify request object. * @param {object} reply Fastify reply object. * @param {object} [metadata] Extra contextual data (unused).

(request, reply, metadata)

Source from the content-addressed store, hash-verified

116 * @param {object} [metadata] Extra contextual data (unused).
117 */
118 routeNotFound (request, reply, metadata) {
119 if (this.isLogDisabled(request)) { return }
120
121 const { url, method } = request.raw
122 request.log.info(`Route ${method}:${url} not found`)
123 }
124
125 /**
126 * Logs a warning when writeHead fails during error handling.

Callers 1

basic404Function · 0.80

Calls 2

isLogDisabledMethod · 0.95
infoMethod · 0.80

Tested by

no test coverage detected