diff --git a/server/play-server/src/main/scala/sttp/tapir/server/play/TapirPlayServer.scala b/server/play-server/src/main/scala/sttp/tapir/server/play/TapirPlayServer.scala index 11c9cbf4eb..7ff0b56cad 100644 --- a/server/play-server/src/main/scala/sttp/tapir/server/play/TapirPlayServer.scala +++ b/server/play-server/src/main/scala/sttp/tapir/server/play/TapirPlayServer.scala @@ -41,8 +41,10 @@ trait TapirPlayServer { val i = value.asInstanceOf[I] e.logic(new FutureMonadError())(i) .map { - case Right(result) => OutputToPlayResponse(ServerDefaults.StatusCodes.success, e.output, result) - case Left(err) => OutputToPlayResponse(ServerDefaults.StatusCodes.error, e.errorOutput, err) + case Right(result) => serverOptions.logRequestHandling.requestHandled(e.endpoint, ServerDefaults.StatusCodes.success.code) + OutputToPlayResponse(ServerDefaults.StatusCodes.success, e.output, result) + case Left(err) => serverOptions.logRequestHandling.requestHandled(e.endpoint, ServerDefaults.StatusCodes.error.code) + OutputToPlayResponse(ServerDefaults.StatusCodes.error, e.errorOutput, err) } } def handleDecodeFailure(