https://kotlinlang.org logo
Title
s

s4nchez

01/21/2021, 2:49 PM
That'll return null rather than blow up if request is not a
RoutedRequest
.
c

Cosmin Victor Celea

01/21/2021, 2:50 PM
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

s4nchez

01/21/2021, 2:52 PM
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

Cosmin Victor Celea

01/21/2021, 2:53 PM
ok, nice to know, thanks.
routes(
        "api/" bind routes(
                contractMain, contractExternal
        )

)
I compose the routes from two contracts
s

s4nchez

01/21/2021, 3:00 PM
That should be fine. But depending on how you use filters around that, it won't be able to access the
RoutedRequest.