Consumer streams terminate on `F.raiseError` from `EnvelopeDecoder`s
This makes it a big pain to use with a parsed type.
Some options were explored in #151, but not completed.
We will want to provide some means to handle those automatically for users, because for example, json decoding using circe is a common use case, and you cannot prevent a publisher from submitting invalid json, or incorrect structure for your given circe.Decoder
As a workaround so far, I've found this useful:
/** Convert a decoder producing `A` to a decode that handles failure with `Left` */
implicit def fallibleDecoder[F[_], A, E](
implicit decoder: EnvelopeDecoder[F, A],
F: MonadError[F, E]
): EnvelopeDecoder[F, Either[E, A]] =
decoder.attempt
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@gvolpe ^ Is there a way we can configure that bot to exclude certain things?
Added the pinned label, that should be enough