Skip to content
Playground(another site)

bynk.http.rejected_signature

Error An on rejected handler is not on rejected(why: BoundaryRejection) -> HttpResult[()] with no by and no given.

on rejected renders the router's own refusals, such as a 413 or a 405, before any handler or actor exists, so it has a fixed shape: one parameter typed BoundaryRejection, returning HttpResult[()] or Effect[HttpResult[()]], with no by, since no actor is known yet, and no given, since it only renders a body. Each departure is reported with the form to write. A second on rejected is bynk.http.duplicate_rejected.

Example

on rejected(why: String) -> Effect[HttpResult[()]] { … } // ✗ the parameter is a `BoundaryRejection`
on rejected(why: BoundaryRejection) -> Effect[HttpResult[()]] { … } // ✓

In the Book

See also

  • The grammar rule it governs: rejected_handler.
  • Every code in its category, HTTP, on the diagnostic index.
  • bynk explain bynk.http.rejected_signature shows the same from the installed toolchain, without a network.