Skip to content

Issue with nested reitit routes in upcoming version #23

Open
@branch14

Description

@branch14

In the upcoming version there seems to be an issue with nested reitit routes.

Flat routes work

:routes
   [["/ping" :my-test/ping]
    ["/pong" :my-test/pong]]

But when specified in nested form

:routes
   [["/v1"
     ["/ping" :my-test/ping]
     ["/pong" :my-test/pong]]]

only the first route works. The /v1/pong route results in a 404.

I checkd with

(require '[reitit.core :as r])
(-> "duct.edn"
        slurp
        (str/replace "#ig/ref" "")
        read-string
        :system
        :duct.module/web
        :routes
        r/router
        r/routes)

and the result seems fine.

Addendum:

Well at least the error message leads to the conclusion that it wants to respond with a 404. What I actually get is Error 500 java.lang.IllegalArgumentException: No implementation of method: :write-body-to-stream of protocol: #&apos;ring.core.protocols/StreamableResponseBody found for class: clojure.lang.PersistentArrayMap and then SERVLET:</th><td>org.eclipse.jetty.servlet.ServletHandler$Default404Servlet.

This is with

org.duct-framework/main {:mvn/version "0.1.8"}
org.duct-framework/module.web {:mvn/version "0.12.7"}

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