Skip to content
Playground(another site)

bynk.http.invalid_path

Error An HTTP route path is malformed.

The router matches a route against the request's path, which always begins with /, so a route that does not is refused rather than guessed at. A : segment must also carry a name, since the name is what binds the value to a handler parameter. Start the route with / and name each parameter, as in "/items/:id". A route under a reserved prefix is bynk.http.reserved_prefix.

Example

on GET("items") () -> Effect[HttpResult[String]] by v: Visitor { … } // ✗ no leading `/`
on GET("/items") () -> Effect[HttpResult[String]] by v: Visitor { … } // ✓

In the Book

See also

  • The grammar rule it governs: http_handler.
  • Every code in its category, HTTP, on the diagnostic index.
  • bynk explain bynk.http.invalid_path shows the same from the installed toolchain, without a network.