# Rule: Raise Error

### Raise Error Example

If two products that should not be purchased together are selected, an error will present to the user as a red text pop-up.&#x20;

Event on the Rule Set to trigger the rule: Plan Selected.

{% code overflow="wrap" lineNumbers="true" %}

```
IF:
    Id = _____ (or Name = _____ )
AND
    Selected = True
AND
    Second.Id = ______ (or Second.Name = _____ )
AND
    Second.selected = True
THEN:
    Raise Error (Text entered into the textbox. Does not support HTML. Ex: "Error. These plans cannot be purchased together")
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.peakcommerce.com/developers/logic-and-rules/rule-raise-error.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
