bynk.parse.dangling_handler_annotation
Error A handler-position annotation (e.g. @cache) is not followed by an on handler.
A handler annotation, such as @cache(maxAge: 5.minutes), applies to the handler after it, so it must sit directly above an on. Here something else, or the end of the service, follows it. Move the annotation to just above its handler.
Example
service api from http { on GET("/rows") () -> Effect[HttpResult[List[Row]]] by v: Visitor { … } @cache(maxAge: 5.minutes)} // ✗ the annotation has no handler to apply to
service api from http { @cache(maxAge: 5.minutes) // ✓ directly above its handler on GET("/rows") () -> Effect[HttpResult[List[Row]]] by v: Visitor { … }}In the Book
See also
- Every code in its category, Parser, on the diagnostic index.
bynk explain bynk.parse.dangling_handler_annotationshows the same from the installed toolchain, without a network.