🚨 Breaking Changes Alert 🚨
- The
CompositeHandler
has been removed. Instead, we recommend using separate base paths for each handler. - Handlers will no longer automatically handle cases where no procedure matches. You are now responsible for returning a
404
response or falling back to other routes. - Official Adapters for
Next.js
andHono.js
if (url.pathname.startsWith('/api')) {
const { matched, response } = await openapiHandler.handle(request, {
prefix: '/api'
})
if (matched) {
return response
}
}
if (url.pathname.startsWith('/rpc')) {
const { matched, response } = await orpcHandler.handle(request, {
prefix: '/rpc'
})
if (matched) {
return response
}
}
return new Response('Not Found', { status: 404 })