akka-http icon indicating copy to clipboard operation
akka-http copied to clipboard

Now that Route.asyncHandler is deprecated, there is now no way to avoid the default ExceptionHandler

Open blast-hardcheese opened this issue 2 years ago • 0 comments

Previously, with Route.asyncHandler, I would describe an ExceptionHandler({ case t => _ => Future.failed(t) }) for use with ScalaTest, to permit bubbling failure assertions out.

It would be nice to have a variant of Route.toFunction that avoids this catch-all that turns exceptions into StatusCodes.InternalServerError, even if it is just for testing.

Guidance here would be appreciated, I am happy to do the work. Thank you!

blast-hardcheese avatar Jul 28 '22 00:07 blast-hardcheese