Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Issue with nested reitit routes in upcoming version

Open
#23 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
clojure
Domain
api, backend

Research direction

Reproduce the issue from the nested :routes example in duct.edn using the listed org.duct-framework/main and module.web versions, then inspect the reitit.core router output and the response path for /v1/pong. Done means both nested routes work and the request no longer produces the 404 or the StreamableResponseBody exception.

Written by the indexing model from the issue text.

Description

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"}
Dominant language
Clojure
Stars
22
Forks
22
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from duct-framework/module.web

All issues in duct-framework/module.web

Similar issues

More Clojure issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.