pekko/akka-docs-dev/rst/scala/http/routing-dsl/directives/basic-directives/cancelRejections.rst

29 lines
793 B
ReStructuredText
Raw Normal View History

.. _-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
Signature
---------
.. includecode2:: /../../akka-http/src/main/scala/akka/http/scaladsl/server/directives/BasicDirectives.scala
: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.
Example
-------
.. includecode2:: ../../../../code/docs/http/scaladsl/server/directives/BasicDirectivesExamplesSpec.scala
:snippet: cancelRejections-filter-example