We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In the http4s client, when a codec fails to parse the expected JSON, it creates a FailedRequest model:
FailedRequest
def parseJson[F[_]: Sync, T]( className: String, r: org.http4s.Response[F] )(implicit decoder: io.circe.Decoder[T]): F[T] = r.attemptAs[T].value.flatMap { case Right(value) => Sync[F].pure(value) case Left(error) => Sync[F].raiseError(new com.foo.bar.api.v2.errors.FailedRequest( r.status.code, s"Invalid json for class[" + className + "]", None, error)) }
It would be desirable to have the headers from the response to be included in this FailedRequest.
The text was updated successfully, but these errors were encountered:
@barryoneill we'd be happy to consider your PR ;-)
Sorry, something went wrong.
Just a moment while I convert it all to tagless final :)
/unsubscribe
No branches or pull requests
In the http4s client, when a codec fails to parse the expected JSON, it creates a
FailedRequest
model:It would be desirable to have the headers from the response to be included in this
FailedRequest
.The text was updated successfully, but these errors were encountered: