Skip to content

Commit

Permalink
Use allocatedCase instead of allocated
Browse files Browse the repository at this point in the history
  • Loading branch information
kubukoz committed Mar 14, 2024
1 parent ff2f791 commit 9d77058
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ object NatchezMiddleware {
implicit ev: MonadCancel[F, Throwable]
): Client[F] =
Client { req =>
Resource {
Resource.applyFull { cancelable =>
Trace[F].span("http4s-client-request") {
for {
knl <- Trace[F].kernel
Expand All @@ -106,7 +106,7 @@ object NatchezMiddleware {
"client.http.method" -> req.method.toString
)
reqʹ = req.withHeaders(knl.toHttp4sHeaders ++ req.headers) // prioritize request headers over kernel ones
rsrc <- client.run(reqʹ).allocated
rsrc <- cancelable(client.run(reqʹ).allocatedCase)
_ <- Trace[F].put("client.http.status_code" -> rsrc._1.status.code.toString())
} yield rsrc
}
Expand Down

0 comments on commit 9d77058

Please sign in to comment.