Handle Errors Assertion

The Handle Errors Assertion a composite assertion that is designed to stop processing when it detects assertion configuration or I/O exceptions from its child assertions. For example, this assertion halts policy processing if it detects:
gateway83
The
Handle Errors Assertion
a composite assertion that is designed to stop processing when it detects assertion configuration or I/O exceptions from its child assertions. For example, this assertion halts policy processing if it detects:
  • An exception, such as the ones triggered by the Raise Error Assertion
  • A catastrophic misconfiguration of a policy assertion. For example, corrupted XML from an imported policy, or corrupt information from the REST Management API.
  • Any error triggered by an unhandled (unexpected) runtime exception. 
 When one of these errors is caught, the Handle Errors Assertion does the following:
  • Stops processing the child assertions
  • Logs the exception
  • Places the exception message in a context variable
  • But does not fail
The Handle Errors Assertion fails only when other types of exceptions are caught.
IMPORTANT:
The Handle Errors Assertion is not intended to be a "catch all" assertion that picks up routine failures from its children (for example, evaluating a Regular Expression fails). For these scenarios, consider using the At Least One Assertion Must Evaluate to True Assertion. These assertions react to failures of any kind from their child assertions.
Contents:
As with the All Assertions Must Evaluate to True Assertion, the Handle Errors Assertion stops processing when an exception is caught. For example, consider this simple policy tree:
Handle Error Assertion
   Join Variable Assertion
  
<Assertion that throws a PolicyAssertionException/IOException>
   Map Value Assertion
In the example above, the Map Value Assertion is not run.
Add the Raise Error Assertion as a child if you need to intentionally throw an exception and halt processing of the Handle Errors Assertion.
Context Variables
Variable
Description
$
{
<prefix>
.message}
Returns the exception message.
Cluster Properties
None