Skip to content
Playground(another site)

bynk.parse.event_pattern_empty

Error A from Events(E { ... }) subscription pattern listed no fields — use from Events(E) (no braces) for an unfiltered subscription.

A pattern in from Events(E { … }) narrows delivery to events whose fields match, so it must name at least one field to match on. An empty E {} filters nothing and only looks as if it does. For every event of the type, drop the braces: from Events(E).

Example

service OnPaid from Events(Paid {}) { // ✗ a pattern with no fields
on event(e: Paid) -> Effect[()] { … }
}
service OnPaid from Events(Paid) { // ✓ every `Paid`
on event(e: Paid) -> Effect[()] { … }
}

In the Book

See also

  • Every code in its category, Parser, on the diagnostic index.
  • bynk explain bynk.parse.event_pattern_empty shows the same from the installed toolchain, without a network.