That'll return null rather than blow up if request...
# http4k
s
That'll return null rather than blow up if request is not a
RoutedRequest
.
c
Yep, that makes sense, I was just curios if there is a way of telling in the filter if the endpoints exists or not.
s
if the top-level handler is built with
route()
, the 404 by default comes with a
route not found
description. Apart from that there's no mechanism to check if route exist.
c
ok, nice to know, thanks.
Copy code
routes(
        "api/" bind routes(
                contractMain, contractExternal
        )

)
I compose the routes from two contracts
s
That should be fine. But depending on how you use filters around that, it won't be able to access the
RoutedRequest.