Skip to content
Playground(another site)

bynk.ws.message_frame_param

Error A WebSocket on message handler does not have exactly one parameter of the service's inbound (in:) frame type — the decoded frame (real-time track slice 3b-iii).

A WebSocket on message handler is called with a decoded inbound frame, so it needs exactly one parameter of the service's in: type. Any other parameters are route values recovered from the connection. Add the frame parameter. A route value whose type differs from on open's is bynk.ws.route_param_mismatch.

Example

service gateway from websocket(in: Frame, out: Frame) {
on message (room: RoomId) -> Effect[()] by user: Member { … } // ✗ no `Frame` parameter
on message (room: RoomId, frame: Frame) -> Effect[()] by user: Member { … } // ✓
}

In the Book

See also

  • Every code in its category, Other, on the diagnostic index.
  • bynk explain bynk.ws.message_frame_param shows the same from the installed toolchain, without a network.