Throw Exception
Audience:
Low-code EngineersSkill Prerequisites:
Actions,Conditions
Raises an error on purpose, which stops the current flow of actions. Use it with a condition to stop processing when data is invalid or a business rule isn't met.
The error can have two messages: an Admin Message with technical details for low-code engineers, and a Friendly Message for end users.
Typical Use Cases
- Stop a submission when a business rule fails, for example an order quantity above the available stock
- Fail a workflow or API call when a required value is missing, so the caller gets an error
- Trigger the
On Erroractions of an enclosing Execute Actions or Repeat - Test error handling while building an application
Don't use it to
- Show a normal validation message on a form. Use Display Error Message or field validation instead.
- Stop without an error. Use Stop Execution instead.
Related Actions
| Action Name | Description |
|---|---|
| Execute Actions | Catches the error with its On Error actions. |
| Stop Execution | Stops the remaining actions without raising an error. |
| Display Error Message | Shows an error message to the user. |
| Log Error | Writes a message to the log without stopping. |
Input Parameter Reference
| Parameter | Description | Supports Tokens | Default | Required |
|---|---|---|---|---|
| Admin Message | The technical message for low-code engineers and administrators, for example Order [OrderId] rejected: quantity [Quantity] exceeds stock [Stock]. It's also the value of the [ExceptionMessage] token in On Error actions. | Yes | empty string | No |
| Friendly Message | The message for end users, for example Sorry, we don't have enough stock for this order. | Yes | empty string | No |