Open livelxw opened 1 year ago
/bounty $75
To fix and add a reproducer testcase.
/attempt #2491
with your implementation plan/claim #2491
in the PR body to claim the bountyThank you for contributing to zio/zio-http!
Add a bounty • Share on socials
Attempt | Started (GMT+0) | Solution |
---|---|---|
🟢 @cheikhsimsol | Jan 6, 2024, 10:26:44 PM | WIP |
/attempt #2491
I observe the same behavior with the latest version.
//> using scala 3.5.0
//> using dep dev.zio::zio-http:3.0.0
import zio.*
import zio.http.*
object Application extends ZIOAppDefault:
val routes: Routes[Any, Nothing] =
Routes(Method.GET / Root -> Handler.die(NotImplementedError()))
override val run: ZIO[Any, Any, Any] =
Server
.serve(routes)
.provide(Server.default)
In this example, the error won't be logged.
Describe the bug The server doesn't print error logs when exceptions were thrown.
To Reproduce Scala 3:
When send a request to
http://localhost:8080/test
, it responds empty body with 500 status code, and no error logs in server.Expected behaviour It should print error logs in server.