Skip to content
Playground(another site)

bynk.http.limits_invalid_field

Error A limits policy field (maxBody) has the wrong value shape.

Every limits { } field is a positive Int literal: maxBody and maxFile are byte counts, and maxParts counts parts. A string such as "1MB", zero or a negative number is refused: there is no size literal yet, and a ceiling of zero would reject every request. Write the count, as 1_048_576 for 1 MiB. A field outside the three is bynk.http.limits_unknown_field. The per-route form of the rule is bynk.http.limit_bad_max_body.

Example

type Note = { text: String }
service api from http {
limits { maxBody: "1MB" } // ✗ a byte count, not a string
on POST("/notes") (body: Note) -> Effect[HttpResult[String]] by v: Visitor { … }
}
service api from http {
limits { maxBody: 1_048_576 } // ✓ 1 MiB
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_invalid_field shows the same from the installed toolchain, without a network.