Skip to content

Adding route_with_tsr creates fallback behaviour #3562

@alper

Description

@alper

I have this router setup:

    Router::new()
        .merge(admin::router())
        .route_layer(login_required!(Backend, login_url = "/login"))
        .merge(public::router())
        .merge(auth::router())

Trying to add route_with_tsr to the routes in two of the routers creates this error message: "Cannot merge two MethodRouters that both have a fallback"

I think it has something to do with the merge behaviour messing with the fallbacks but what I don't get is why this happens when I start adding route_with_tsr since it looks like that only adds more routes and does not do anything else.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions