/Wiki/sources/honojs__hono/2026/https-hono-dev-llms-full-txt-not-found-15fce08df476-not-found-s0052-c0001.md
Not Found (2) - hono-docs
Not Found (2) Source evidence: /Sources/raw/honojs hono/honojs hono.md Canonical citation: https://hono.dev/llms full.txt not found Summary ts export const r...
Not Found (2)
Source evidence: /Sources/raw/honojshono/honojshono.md Canonical citation: https://hono.dev/llms-full.txt#not-found
Summary
## Content
```ts
export const routes = new Hono().get(
'/posts',
zValidator(
'query',
z.object({
id: z.string(),
})
),
async (c) => {
const { id } = c.req.valid('query')
const post = await getPost(id)
if (!post) {
return c.json({ error: 'not found' }, 404) // Specify 404
}
return c.json({ post }, 200) // Specify 200
}
)