Assert Defined
What It Does
The Assert defined node checks if a value is defined and throws an error if it's undefined. It helps enforce data requirements in your graph by stopping execution when required values are missing.
Inputs
| Name | Description | Type | Required |
|---|---|---|---|
| Value | The value to check for being defined | Any | Yes |
Outputs
| Name | Description | Type |
|---|---|---|
| Value | The original input value (if defined) | Any |

How to Use It
- Drag the Assert defined node into your graph.
- Connect any value to the "Value" input.
- If the value is defined, it passes through to the output.
- If the value is undefined, the node throws an error and stops graph execution.
Tips
- Use this node to validate required inputs early in your graph.
- This creates a clear failure point rather than propagating undefined values.
See Also
- Has Value: For checking if a value is defined without throwing an error.
- If: For conditionally executing different paths based on value existence.
Use Cases
- Input Validation: Ensure required parameters have values before processing.
- Error Prevention: Stop graph execution early if critical data is missing.
- API Response Validation: Verify that expected properties exist in data responses.