bynk.http.query_not_http
Error A RequestQuery appears on a handler that is not an HTTP route.
RequestQuery is the query string of an HTTP request. A handler that is not an on http route, such as a cron schedule, answers no request, so it has no query string to take. Remove the parameter, or, if the work is a reply to a caller, make it an on http handler. On an HTTP route, query is a record or RequestQuery and nothing else: bynk.http.query_wrong_type.
Example
service ticker from cron { on schedule("*/5 * * * *") (query: RequestQuery) -> Effect[Result[(), String]] { … } // ✗ no request}
service ticker from http { on GET("/ticks") (query: RequestQuery) -> Effect[HttpResult[String]] by v: Visitor { … } // ✓}In the Book
See also
- The grammar rule it governs:
http_handler. - Every code in its category, HTTP, on the diagnostic index.
bynk explain bynk.http.query_not_httpshows the same from the installed toolchain, without a network.