Overview
Example Lab Details | |
| Version | 6.12.1 |
| Root Folder | Example Lab - API Exception |
| Modules | None |
| Dependencies | None |
This Example Lab project demonstrates how to use the Throw API Exception Step
Explanation
This Flow has one input of the type Integer. This input is passed to an Equals (Number) Rule that checks if it is equal to 1. If it is the Flow completes. If it's not, the flow goes to the Throw API Exception Step, which throws an exception with the message "wrong number, try 1" and code 400. If this Flow as called as a REST service, this code and message are what is returned. The message and status code can be set on the step to customize how a Flow returns errors when called as a REST service.
