Welcome to Portal
For instance, in an employee onboarding system, you might configure Error Selector to extract error codes and messages dynamically from error details during execution.
Here's how you can configure an Error Selector in Code view.
"error_selector": {"error_code": "EXC_TME_EXC","error_message": "Execution Time Exceeded"}
To dynamically retrieve error details from the execution during error scenarios:
"error_selector": {"error_code": "$.error_code","error_message": "$.error_description"}
Error Path specifies the location where the error details should be directed for further analysis or handling. If the Error Path isn't specified, the processed input from the previous state is automatically sent to a designated fallback state when an error occurs.
{"onboard_employee": {"type": "function","next": "End","start": true,"function_id": "function_emp_onboard_1","on_error": [{"error_type": "timeout_error","fallback": {"next": "End","error_selector": {"error_code": "EXC_TME_EXC","error_description": "Execution Time Limit Exceeded"},"error_path": "$.error"}}]}}
In this case, the error details are sent to the '$.error' path for further evaluation and appropriate action.
The example JSON below illustrates sample error details generated by the system during an error occurrence, providing information about the error's nature and context for further actions.
{"status": "error","message": "Employee onboarding failed","error_code": "EXC_TME_EXC","error_description": "Execution Time Exceeded"}