We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4641ed0 commit d737de7Copy full SHA for d737de7
README.md
@@ -52,7 +52,14 @@ import { NotFoundError } from 'http-errors-enhanced'
52
53
const server = fastify()
54
55
-// Note that await is mandatory here otherwise response validation will be lost
+/*
56
+Since fastify-http-errors-enhanced uses an onRoute hook, you have to either:
57
+
58
+* use `await register...`
59
+* wrap you routes definitions in a plugin
60
61
+See: https://www.fastify.io/docs/latest/Guides/Migration-Guide-V4/#synchronous-route-definitions
62
+*/
63
await server.register(fastifyHttpErrorsEnhanced)
64
65
server.get('/invalid', {
0 commit comments