Skip to content

Commit c9bcde4

Browse files
authored
docs: added note on handling of invalid URLs in setNotFoundHandler (fastify#5661)
1 parent 3b0f769 commit c9bcde4

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

docs/Reference/Server.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1784,7 +1784,10 @@ call is encapsulated by prefix, so different plugins can set different not found
17841784
handlers if a different [`prefix` option](./Plugins.md#route-prefixing-option)
17851785
is passed to `fastify.register()`. The handler is treated as a regular route
17861786
handler so requests will go through the full [Fastify
1787-
lifecycle](./Lifecycle.md#lifecycle). *async-await* is supported as well.
1787+
lifecycle](./Lifecycle.md#lifecycle) for unexisting URLs.
1788+
*async-await* is supported as well.
1789+
Badly formatted URLs are sent to the [`onBadUrl`](#onbadurl)
1790+
handler instead.
17881791
17891792
You can also register [`preValidation`](./Hooks.md#route-hooks) and
17901793
[`preHandler`](./Hooks.md#route-hooks) hooks for the 404 handler.

0 commit comments

Comments
 (0)