Duolith docs

Errors E0500 to E0599

E0582 paths() value that cannot be an address

Message file: problem

Words in italics are filled in when the compiler reports it, such as the element's name or the list of known ones.

Why

Each entry paths() returns gives a text value for each of the route's parameters, and each value becomes a path segment and a file name in the build. A value that is not text, is empty or longer than 200 bytes, is . or .., or holds /, \, %, ?, #, or a control character could name a file outside the route's folder or an address the router reads differently, so it is refused. A rest parameter's value is checked segment by segment.

How to fix it

Return one record per address with text for each parameter, such as [{ id: "7" }], and turn identifiers into plain segments (a slug) before returning them.

In a terminal

duolith explain E0582

Mentioned in