Back to FAQ library

How can we build out unit tests to cover multiple error handlers for the same errorType, but different when conditions.

If you create the error using the Mock When processor, you can use the cause field on the Error tab to include details about the error, including error.description e.g. cause="#[java!java::lang::Exception::new('My Custom Error Description')]"

Diagram