From 484b778eb28f3569662339247b0922f4caacef7b Mon Sep 17 00:00:00 2001 From: danicheg Date: Sat, 7 Dec 2024 14:13:59 +0300 Subject: [PATCH] Add a new constructor for ArmeriaHttp4sHandler and deprecate a former one --- .../armeria/server/ArmeriaHttp4sHandler.scala | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/server/src/main/scala/org/http4s/armeria/server/ArmeriaHttp4sHandler.scala b/server/src/main/scala/org/http4s/armeria/server/ArmeriaHttp4sHandler.scala index be29b40..9277909 100644 --- a/server/src/main/scala/org/http4s/armeria/server/ArmeriaHttp4sHandler.scala +++ b/server/src/main/scala/org/http4s/armeria/server/ArmeriaHttp4sHandler.scala @@ -247,7 +247,19 @@ private[armeria] object ArmeriaHttp4sHandler { def apply[F[_]: Async]( prefix: String, service: HttpApp[F], - dispatcher: Dispatcher[F]): ArmeriaHttp4sHandler[F] = + serviceErrorHandler: ServiceErrorHandler[F], + dispatcher: Dispatcher[F] + ): ArmeriaHttp4sHandler[F] = + new ArmeriaHttp4sHandler(prefix, service, serviceErrorHandler, dispatcher) + + @deprecated( + "Use fully specified `org.http4s.armeria.server.ArmeriaHttp4sHandler.apply` instead", + "0.5.5") + def apply[F[_]: Async]( + prefix: String, + service: HttpApp[F], + dispatcher: Dispatcher[F] + ): ArmeriaHttp4sHandler[F] = new ArmeriaHttp4sHandler(prefix, service, DefaultServiceErrorHandler, dispatcher) private val serverSoftware: ServerSoftware =