Why does ZIO not log uncaught exceptions?

89 views Asked by At
def someEndpoint(): Task[Unit] = ZIO.from { 
   throw new RuntimeException("badness happened") 
}

This returns a proper failed Task, that can be handled downstream

def badEndpoint(): Task[Unit] = ZIO.succeed { 
   throw new RuntimeException("badness")
}

This does not ... which is kinda understandable (albeit only a little bit): you asked it to succeed, so it did (but not really) ... But my question is where does the exception go? In every other framework I have worked with in the past, uncaught exceptions get logged somewhere at the top (or bottom, depending on how you look at it) of the stack. But with ZIO (zio http specifically), there seems to be no feedback. A 500 is returned to the client, but I cannot see anything in the log possibly pointing to the cause.

I am wondering if there it is a general problem with ZIO or if something is just missing in my configuration?

0

There are 0 answers