---
schema_version: "1"
id: d5e981fc3abc30cf77c36eb069c25e58ea5744313834b2ac28a9dc45aea84c98
title: MUnit Fail Event Processor
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/munit/latest/fail-event-processor.md
canonical_url: https://docs.mulesoft.com/munit/latest/fail-event-processor
source_site: docs.mulesoft.com
content_type: documentation
content_hash: bab1d9525e0adcedf6dd92ac9daec6e4b445d31a6d3386e95b44306d4d627154
description: MuleSoft Documentation Site
release: "3.7"
latest: true
---
---
product: MUnit
version: 3.7
is-latest-version: true
---

# MUnit Fail Event Processor

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

![logo acb active](/mulesoft/current/en-us/_/img/icons/anypoint-code-builder.svg "Anypoint Code Builder")Anypoint Code
Builder

![logo studio active](/mulesoft/current/en-us/_/img/icons/studio.svg "Anypoint Studio")Anypoint Studio

The MUnit Fail event processor forces a MUnit test to fail at a specific point in the flow, which is
useful for validating that certain code paths are never reached. Use it to catch unexpected
execution paths during testing.

```xml
<munit-tools:fail
  message="This should fail"/>
```

The message field is optional and defines the error message to print when the assertion fails. The
processor throws a `MUNIT-TOOLS:ASSERTION_ERROR`.
