bynk.http.limit_duplicate
Error A handler carries more than one @limit annotation.
A route has one request-body ceiling, so a handler carries one @limit. Two would set two ceilings for the same body with nothing to say which applies, and the second is refused. Keep the one you want. To set a default for every body-taking route of a service, write a limits { } section: a route's @limit overrides it. A handler may likewise carry only one @cache (bynk.http.cache_duplicate), @raw or @json.
Example
type Note = { text: String }
@limit(maxBody: 1_000_000)@limit(maxBody: 5_000_000) // ✗ a second `@limit`on POST("/notes") (body: Note) -> Effect[HttpResult[String]] by v: Visitor { … }
@limit(maxBody: 5_000_000) // ✓ one ceilingon 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_duplicateshows the same from the installed toolchain, without a network.