case classTransformationRejection(transform: (List[Rejection]) ⇒ List[Rejection]) extends Rejection with Product with Serializable
A special Rejection that serves as a container for a transformation function on rejections.
It is used by some directives to "cancel" rejections that are added by later directives of a similar type.
Consider this route structure for example:
put { reject(ValidationRejection("no") } ~ get { ... }
If this structure is applied to a PUT request the list of rejections coming back contains three elements:
1. A ValidationRejection
2. A MethodRejection
3. A TransformationRejection holding a function filtering out the MethodRejection
so that in the end the RejectionHandler will only see one rejection (the ValidationRejection), because the
MethodRejection added by the get directive is cancelled by the put directive (since the HTTP method
did indeed match.
Linear Supertypes
Serializable, Serializable, Product, Equals, Rejection, AnyRef, Any
A special Rejection that serves as a container for a transformation function on rejections. It is used by some directives to "cancel" rejections that are added by later directives of a similar type.
Consider this route structure for example:
put { reject(ValidationRejection("no") } ~ get { ... }
If this structure is applied to a PUT request the list of rejections coming back contains three elements:
1. A ValidationRejection 2. A MethodRejection 3. A TransformationRejection holding a function filtering out the MethodRejection
so that in the end the RejectionHandler will only see one rejection (the ValidationRejection), because the MethodRejection added by the
directive is cancelled by theget
directive (since the HTTP method did indeed match.put