bynk.http.raw_unknown_arg
Error A @raw annotation has an argument outside the closed set (contentType).
@raw takes one argument, contentType:, the media type the route accepts. The set is closed, so a misspelt or invented argument is refused rather than ignored, which would leave the route behaving otherwise than you wrote. A size ceiling is not an argument of @raw: it is a separate @limit(maxBody: …). Remove the argument. A bad contentType is bynk.http.raw_bad_content_type.
Example
@raw(contentType: "image/png", maxSize: 10) // ✗ not an argument of `@raw`@limit(maxBody: 1_000_000)on POST("/avatars") (body: Bytes) -> Effect[HttpResult[String]] by v: Visitor { … }
@raw(contentType: "image/png") // ✓@limit(maxBody: 1_000_000)on POST("/avatars") (body: Bytes) -> 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.raw_unknown_argshows the same from the installed toolchain, without a network.