bynk.test.service_bad_address
Error A test body addresses a service the wrong way for its protocol (e.g. an http route without a leading path string).
A test addresses an http route by method and route pattern, as in api.POST("/items", body). The first argument must be that pattern as a string literal, so a number or a variable is refused. The same code covers other addresses used the wrong way, such as fetching an asset through a service that is not from http.
Example
service api from http { … }
// tests/api.test.bynklet r <- api.POST(1, "x") by Visitor // ✗ not a patternlet r <- api.POST("/items", "x") by Visitor // ✓In the Book
See also
- The grammar rule it governs:
case. - Every code in its category, Tests, on the diagnostic index.
bynk explain bynk.test.service_bad_addressshows the same from the installed toolchain, without a network.