Skip to content
Playground(another site)

bynk.http.limits_not_http

Error A limits { } policy appears on a service that is not from http.

A limits { } section sets the request-body ceilings of a service's routes, and only a from http service has routes that take requests, so on a cron or other service it is refused. Move it to the HTTP service it was meant for, or delete it. The cors, security and json sections have the same rule: bynk.http.cors_not_http, bynk.http.security_not_http, bynk.http.json_not_http.

Example

type Note = { text: String }
service jobs from cron {
limits { maxBody: 1_000_000 } // ✗ a schedule takes no request body
on schedule("0 0 * * *") () -> Effect[Result[(), String]] { … }
}
service api from http {
limits { maxBody: 1_000_000 } // ✓
on 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.limits_not_http shows the same from the installed toolchain, without a network.