PassthroughCirceHttpError

Middlewares for raising RFC 7807 errors in client responses as errors in some F type.

class Object
trait Matchable
class Any

Value members

Concrete methods

def apply[F[_]](implicit F: Concurrent[F]): () => F

Middleware which looks for RFC 7807 errors by discriminating on the Content-Type header. If that header is application/problem+json, then it will attempt to decode the body as a ExtensibleCirceHttpProblem.

Middleware which looks for RFC 7807 errors by discriminating on the Content-Type header. If that header is application/problem+json, then it will attempt to decode the body as a ExtensibleCirceHttpProblem.

If the Content-Type is missing or is any other value this middleware does nothing to the Response.

If the Content-Type ''is'' application/problem+json, but the decode fails this should indicate a malformed ExtensibleCirceHttpProblem. In that case the original Response is returned, but it is made strict. This is necessarily to avoid attempting to re-stream the HTTP response.