npm hono 2.7.7
v2.7.7

latest releases: 4.6.2, 4.6.1, 4.6.0...
19 months ago

Summary

Since it only includes a slight change in the feature, released as a patch-release.

Enable onError of sub instances

This release enables onError of sub instances attached by app.route().

const app = new Hono()
const sub = new Hono()

sub.get('/ok', async (c) => {
  return c.text('ok')
})

sub.get('/error', () => {
  throw new Error('This is Error')
})

sub.onError((_, c) => {
  return c.text('onError by sub', 500)
})

app.route('/sub', sub)

If you access GET /sub/error, it will return onError by sub.

What's Changed

Full Changelog: v2.7.6...v2.7.7

Don't miss a new hono release

NewReleases is sending notifications on new releases.