Skip to content

Stack traces are logged to console in 0.23.12 #705

@rossabaker

Description

@rossabaker
//> using scala "2.13"
//> using lib "org.http4s::http4s-blaze-server:0.23.12"
//> using lib "org.http4s::http4s-blaze-client:0.23.12"
//> using lib "org.slf4j:slf4j-nop:1.7.36"

import cats.effect._
import cats.syntax.all._
import fs2._
import org.http4s._
import org.http4s.implicits._
import org.http4s.blaze.server._
import org.http4s.blaze.client._
import scala.concurrent.duration._

object Boo extends IOApp.Simple {
  val app = HttpApp.liftF(IO.raiseError[Response[IO]](new Exception("d'oh")))

  def run =
    BlazeServerBuilder[IO].withHttpApp(app).resource.use { _ =>
      BlazeClientBuilder[IO].resource.use { client =>
        Stream(client.status(Request[IO](uri = uri"http://localhost:8080/")))
          .covary[IO]
          .map(Stream.eval)
          .repeat
          .take(16)
          .parJoin(8)
          .compile
          .drain
      }
    }
}
$ scala-cli run stacktrace.scala 2>&1 | grep -c d.oh
16

D'oh. Downgrade to 0.23.11:

$ scala-cli run stacktrace.scala 2>&1 | grep -c d.oh
0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions