bynk.http.return_not_effect_http_result
Error An HTTP handler does not return Effect[HttpResult[T]].
An on http handler returns Effect[HttpResult[T]]: Effect because it may use capabilities, and HttpResult[T] because the status is part of the answer (Ok, Created, NotFound, and so on). An Effect[T] with no status is refused. Wrap the type, and return one of the HttpResult variants.
Example
on GET("/items") () -> Effect[String] by v: Visitor { … } // ✗ no `HttpResult`
on GET("/items") () -> Effect[HttpResult[String]] by v: Visitor { … } // ✓In the Book
See also
- The grammar rule it governs:
http_handler. - Every code in its category, HTTP, on the diagnostic index.
bynk explain bynk.http.return_not_effect_http_resultshows the same from the installed toolchain, without a network.