bynk.parse.duplicate_limits
Error A service declares more than one limits { } policy.
A service has one limits policy, and it sets the body-size cap for its body-taking routes. Two blocks could name different caps, and the reader would not know which holds, so the second is refused. Merge them into one, keeping the cap you mean. A single route can still differ with @limit on its handler. cors, security and json follow the same rule (bynk.parse.duplicate_cors, bynk.parse.duplicate_security, bynk.parse.duplicate_json).
Example
service api from http { limits { maxBody: 1_048_576 } limits { maxBody: 4_194_304 } // ✗ a second `limits` on POST("/a") (body: Int) -> Effect[HttpResult[Int]] by Visitor { … }}
service api from http { limits { maxBody: 4_194_304 } // ✓ one cap on POST("/a") (body: Int) -> Effect[HttpResult[Int]] by Visitor { … }}In the Book
See also
- The grammar rule it governs:
service_decl. - Every code in its category, Parser, on the diagnostic index.
bynk explain bynk.parse.duplicate_limitsshows the same from the installed toolchain, without a network.