/Wiki/sources/honojs__hono/2026/https-hono-dev-llms-full-txt-onnotfound-75f6604e9220-onnotfound-s0417-c0000.md
`onNotFound` - hono-docs
onNotFound Source evidence: /Sources/raw/honojs hono/honojs hono.md Canonical citation: https://hono.dev/llms full.txt onnotfound Summary You can specify han...
onNotFound
Source evidence: /Sources/raw/honojshono/honojshono.md Canonical citation: https://hono.dev/llms-full.txt#onnotfound
Summary
You can specify handling when the requested file is not found with onNotFound: ts app.get( '/static/*', serveStatic({ onNotFound: (path, c) => { console.log(`${path} is not found, you access ${c.req.path}`) }, }) )
Content
You can specify handling when the requested file is not found with onNotFound:
app.get(
'/static/*',
serveStatic({
onNotFound: (path, c) => {
console.log(`${path} is not found, you access ${c.req.path}`)
},
})
)