Skip to content
Playground(another site)

bynk.test.service_no_call_handler

Error A test body invokes svc.call(...) on a service with no on call handler (a from http/cron/queue service).

A case reaches a service through the address its protocol has. svc.call(…) runs an on call handler, so it needs one; a from http service is driven by route (api.POST("/items", body)), a from cron service by its schedule, a from queue service by message. Use the address the service has. The Book's table of addresses lists each.

Example

demo/api.bynk
service api from http { … }
// tests/api.test.bynk
let r <- api.call("x") // ✗ no `on call` handler
let r <- api.POST("/items", "x") by Visitor // ✓ its route

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_no_call_handler shows the same from the installed toolchain, without a network.