Skip to content
Playground(another site)

bynk.given.unknown_capability

Error given names a capability that does not exist.

A given clause names a capability that no provider declares. A capability is a typed interface to the outside world; it has to be declared (as a capability, or brought in from a consumed context) before a handler can ask for it. This usually means a typo in the capability name, or a missing uses/consumes that would bring the capability into scope.

Example

provides Greeter = Polite given Loger { … } // ✗ no capability named `Loger`
provides Greeter = Polite given Logger { … } // ✓ matches the declared capability

In the Book

See also