diff --git a/docs/Reference/Server.md b/docs/Reference/Server.md index 77e7805b41..1af2057c8e 100644 --- a/docs/Reference/Server.md +++ b/docs/Reference/Server.md @@ -1426,6 +1426,13 @@ plugins are registered. If you would like to augment the behavior of the default arguments `fastify.setNotFoundHandler()` within the context of these registered plugins. +> Note: Some config properties from the request object will be +> undefined inside the custom not found handler. E.g: +> `request.routerPath`, `routerMethod` and `context.config`. +> This method design goal is to allow calling the common not found route. +> To return a per-route customized 404 response, you can do it in +> the response itself. + #### setErrorHandler