Skip to content
Playground(another site)

bynk.queue.return_not_queue_result

Error An on message handler does not return Effect[QueueResult].

A queue consumer answers the queue, not a caller, and the only answers it understands are Ack (the message is handled) and Retry(reason) (deliver it again). The handler's return type is therefore fixed at Effect[QueueResult], so a Result or a value cannot be mistaken for a verdict. Return Ack on success and Retry with a reason when the message should come back. The cron counterpart is bynk.cron.return_not_effect_result.

Example

on message(message: String) -> Effect[Result[Int, String]] { … } // ✗ the queue needs a verdict
on message(message: String) -> Effect[QueueResult] { … } // ✓ `Ack` or `Retry(…)`

In the Book

See also

  • The grammar rule it governs: handler.
  • Every code in its category, Queue, on the diagnostic index.
  • bynk explain bynk.queue.return_not_queue_result shows the same from the installed toolchain, without a network.