Skip to content
Playground(another site)

bynk.parse.unknown_handler_kind

Error An unknown handler form (expected call, an HTTP method, schedule, or message).

A handler is on and a kind the compiler knows: call, an HTTP method, schedule, message and the like. An HTTP method is written in capitals, GET, POST, PUT, PATCH or DELETE, so on get(…) is not a handler. Spell the kind as one of these.

Example

service api from http {
on get("/rows") () -> Effect[HttpResult[List[Row]]] by v: Visitor { … } // ✗ methods are capitals
}
service api from http {
on GET("/rows") () -> Effect[HttpResult[List[Row]]] by v: Visitor { … } // ✓
}

In the Book

See also

  • The grammar rule it governs: handler.
  • Every code in its category, Parser, on the diagnostic index.
  • bynk explain bynk.parse.unknown_handler_kind shows the same from the installed toolchain, without a network.