bynk.http.limit_on_bodyless
Error A @limit annotation is placed on a handler that takes no body (a GET or DELETE).
@limit caps the size of a request body, so it means something only on a route that reads one: POST, PUT or PATCH. A GET or DELETE takes no body in Bynk, so there is nothing to cap. Move the annotation to the body-taking route, or remove it. A default for every body-taking route in a service goes in limits { maxBody: … }.
Example
@limit(maxBody: 1_000_000) // ✗ a `GET` has no bodyon GET("/notes") () -> Effect[HttpResult[String]] by v: Visitor { … }
type Note = { text: String }
@limit(maxBody: 1_000_000) // ✓ a route that reads a bodyon POST("/notes") (body: Note) -> Effect[HttpResult[String]] by v: Visitor { … }In the Book
See also
- Every code in its category, HTTP, on the diagnostic index.
bynk explain bynk.http.limit_on_bodylessshows the same from the installed toolchain, without a network.