Try/Catch — Reference
Handle exceptions from a nested server workflow.
Handle exceptions from a nested server workflow.
Before you begin
Section titled “Before you begin”- An open Server Connect action. Runtime differences below refer to the installed Node.js and PHP implementations.
Try/Catch
Section titled “Try/Catch”Handle exceptions from a nested server workflow.
Settings and execution
Section titled “Settings and execution”| Setting | Meaning |
|---|---|
| Try | The steps that may throw. Normal successful execution skips Catch. |
| Catch | The steps to run after an exception. The error message is available as $_ERROR. Node.js also exposes $_EXCEPTION; do not assume that extra object is available in PHP. |
Worked example
Section titled “Worked example”Put Throw Error with Message Test failure inside Try. In Catch, return a controlled error response or set an output flag. Run once with the throw present and once with a successful step to verify both branches.
Check the behavior and limits
Section titled “Check the behavior and limits”A remote API step configured to forward errors may send a response instead of producing an exception to catch. Configure its error flags deliberately. Catching an exception does not undo earlier side effects.
Continue with a task
Section titled “Continue with a task”Use the Server Connect guides when you need the surrounding project, data-loading or form procedure.
Check your result
Section titled “Check your result”You can configure Try/Catch deliberately and verify the result and failure behavior described in this reference.