(req, res)
| 173 | } |
| 174 | |
| 175 | function fourOhFourFallBack (req, res) { |
| 176 | // if this happen, we have a very bad bug |
| 177 | // we might want to do some hard debugging |
| 178 | // here, let's print out as much info as |
| 179 | // we can |
| 180 | const fourOhFourContext = this[kFourOhFourLevelInstance][kFourOhFourContext] |
| 181 | const id = getGenReqId(fourOhFourContext.server, req) |
| 182 | const childLogger = createChildLogger(fourOhFourContext, logger, req, id) |
| 183 | |
| 184 | childLogger.info({ req }, 'incoming request') |
| 185 | |
| 186 | const request = new Request(id, null, req, null, childLogger, fourOhFourContext) |
| 187 | const reply = new Reply(res, request, childLogger) |
| 188 | |
| 189 | request.log.warn('the default handler for 404 did not catch this, this is likely a fastify bug, please report it') |
| 190 | request.log.warn(router.prettyPrint()) |
| 191 | reply.code(404).send(new FST_ERR_NOT_FOUND()) |
| 192 | } |
| 193 | } |
| 194 | |
| 195 | module.exports = fourOhFour |
nothing calls this directly
no test coverage detected