c
sttp.tapir.server.interceptor.decodefailure
DefaultDecodeFailureHandler
Companion object DefaultDecodeFailureHandler
case class DefaultDecodeFailureHandler(respond: (DecodeFailureContext) => Option[(StatusCode, List[Header])], failureMessage: (DecodeFailureContext) => String, response: (StatusCode, List[Header], String) => ValuedEndpointOutput[_]) extends DecodeFailureHandler with Product with Serializable
A decode failure handler, which:
- decides whether the given decode failure should lead to a response (and if so, with which status code and headers), using
respond - in case a response is sent, creates the message using
failureMessage - in case a response is sent, creates the response using
response, given the status code, headers, and the created failure message. By default, the headers might include authentication challenge.
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- DefaultDecodeFailureHandler
- Serializable
- Product
- Equals
- DecodeFailureHandler
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Instance Constructors
- new DefaultDecodeFailureHandler(respond: (DecodeFailureContext) => Option[(StatusCode, List[Header])], failureMessage: (DecodeFailureContext) => String, response: (StatusCode, List[Header], String) => ValuedEndpointOutput[_])
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def apply(ctx: DecodeFailureContext): Option[ValuedEndpointOutput[_]]
Given the context in which a decode failure occurred (the request, the input and the failure), returns an optional response to the request.
Given the context in which a decode failure occurred (the request, the input and the failure), returns an optional response to the request.
Noneindicates that no action should be taken, and the request might be passed for decoding to other endpoints.Inputs are decoded in the following order: path, method, query, headers, body. Hence, if there's a decode failure on a query parameter, any method & path inputs of the input must have matched and must have been decoded successfully.
- Definition Classes
- DefaultDecodeFailureHandler → DecodeFailureHandler
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- val failureMessage: (DecodeFailureContext) => String
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- val respond: (DecodeFailureContext) => Option[(StatusCode, List[Header])]
- def response(messageOutput: (String) => ValuedEndpointOutput[_]): DefaultDecodeFailureHandler
- val response: (StatusCode, List[Header], String) => ValuedEndpointOutput[_]
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated