RouterBuilder

smithy4s.http4s.SimpleProtocolBuilder.RouterBuilder
class RouterBuilder[Alg[_[_, _, _, _, _]], F[_]]

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

Applies the error transformation to the errors that are not in the smithy spec (has no effect on errors from spec). Transformed errors raised in endpoint implementation will be observable from middleware. Errors raised in the middleware will be transformed too.

Applies the error transformation to the errors that are not in the smithy spec (has no effect on errors from spec). Transformed errors raised in endpoint implementation will be observable from middleware. Errors raised in the middleware will be transformed too.

The following two are equivalent:

val handlerPF: PartialFunction[Throwable, F[Throwable]] = ???
builder.flatMapErrors(handlerPF).middleware(middleware)
val handlerPF: PartialFunction[Throwable, F[Throwable]] = ???
val handler = ServerEndpointMiddleware.flatMapErrors(handlerPF)
builder.middleware(handler |+| middleware |+| handler)

Attributes

def make: Either[UnsupportedProtocolError, HttpRoutes[F]]

Applies the error transformation to the errors that are not in the smithy spec (has no effect on errors from spec). Transformed errors raised in endpoint implementation will be observable from middleware. Errors raised in the middleware will be transformed too.

Applies the error transformation to the errors that are not in the smithy spec (has no effect on errors from spec). Transformed errors raised in endpoint implementation will be observable from middleware. Errors raised in the middleware will be transformed too.

The following two are equivalent:

val handlerPF: PartialFunction[Throwable, Throwable] = ???
builder.mapErrors(handlerPF).middleware(middleware)
val handlerPF: PartialFunction[Throwable, Throwable] = ???
val handler = ServerEndpointMiddleware.mapErrors(handlerPF)
builder.middleware(handler |+| middleware |+| handler)

Attributes

Concrete fields