2015-05-11 23:05:18 +02:00
|
|
|
.. _-cancelRejections-:
|
|
|
|
|
|
|
|
|
|
cancelRejections
|
|
|
|
|
================
|
|
|
|
|
|
2015-10-08 16:26:29 +02:00
|
|
|
Adds a ``TransformationRejection`` cancelling all matching rejections
|
|
|
|
|
to the rejections potentially coming back from the inner route
|
2015-05-11 23:05:18 +02:00
|
|
|
|
|
|
|
|
Signature
|
|
|
|
|
---------
|
|
|
|
|
|
2015-06-19 15:35:24 +02:00
|
|
|
.. includecode2:: /../../akka-http/src/main/scala/akka/http/scaladsl/server/directives/BasicDirectives.scala
|
2015-05-11 23:05:18 +02:00
|
|
|
:snippet: cancelRejections
|
|
|
|
|
|
|
|
|
|
Description
|
|
|
|
|
-----------
|
|
|
|
|
|
2015-10-08 16:26:29 +02:00
|
|
|
Cancels all rejections created by the inner route for which the condition argument function returns ``true``.
|
|
|
|
|
|
|
|
|
|
See also :ref:`-cancelRejection-`, for canceling a specific rejection.
|
|
|
|
|
|
|
|
|
|
Read :ref:`rejections-scala` to learn more about rejections.
|
2015-05-11 23:05:18 +02:00
|
|
|
|
|
|
|
|
Example
|
|
|
|
|
-------
|
|
|
|
|
|
2015-05-21 17:34:46 +02:00
|
|
|
.. includecode2:: ../../../../code/docs/http/scaladsl/server/directives/BasicDirectivesExamplesSpec.scala
|
|
|
|
|
:snippet: cancelRejections-filter-example
|