bynk.actor.duplicate_sum_scheme
Error Two peers in a multi-actor sum share an authentication scheme.
Peers in a by who: A | B clause are told apart by their authentication scheme, so two peers of the same scheme can't both be reached: the second would never be chosen. Keep one peer per scheme, or fold the two into a single actor. A catch-all peer placed too early is a different mistake, bynk.actor.unreachable_sum_arm.
Example
type UserId = String where NonEmptyactor One { auth = Bearer(secret = "KEY_A"), identity = UserId }actor Two { auth = Bearer(secret = "KEY_B"), identity = UserId }
service api from http { on POST("/x") () -> Effect[HttpResult[String]] by who: One | Two { // ✗ two `Bearer` peers
service api from http { on POST("/x") () -> Effect[HttpResult[String]] by who: One | Visitor { // ✓ one peer per schemeIn the Book
See also
- Every code in its category, Actors, on the diagnostic index.
bynk explain bynk.actor.duplicate_sum_schemeshows the same from the installed toolchain, without a network.