bynk.actor.refinement_predicate_unsupported
Error A refinement actor's where predicate is outside the closed claim-predicate set.
A refinement actor's where is checked against a token's claims, which are untyped JSON, so the predicate is a closed vocabulary: hasClaim("name") and claimEquals("name", "value"), composed with &&, || and !. Express the condition with those. Anything else, such as a call to a function of your own, is refused.
Example
type UserId = String where NonEmptyactor User { auth = Bearer(secret = "JWT_KEY"), identity = UserId }
actor Admin = User where isAdmin(user) // ✗ not a claim predicate
actor Admin = User where hasClaim("admin") // ✓In the Book
See also
- Every code in its category, Actors, on the diagnostic index.
bynk explain bynk.actor.refinement_predicate_unsupportedshows the same from the installed toolchain, without a network.