bynk.actor.sum_requires_binder
Error A multi-actor sum by clause has no binder to match the resolved actor.
by A | B tries the actors in order and the first that verifies the caller wins. Which one that was is only known when a request arrives, so the handler learns it through the binder and matches on it. With no binder the answer would be thrown away and the sum would do nothing a single actor does not. Add one, by who: A | B, and match who in the body. A single actor needs no binder.
Example
on GET("/x") () -> Effect[HttpResult[String]] by User | Visitor { // ✗ which one was it?
on GET("/x") () -> Effect[HttpResult[String]] by who: User | Visitor { // ✓ `who` is the resolved actorIn the Book
See also
- Every code in its category, Actors, on the diagnostic index.
bynk explain bynk.actor.sum_requires_bindershows the same from the installed toolchain, without a network.