iflytek/astron-agent · error · CustomException
VARIABLE_POOL_SET_PARAMETER_ERROR
VARIABLE_POOL_SET_PARAMETER_ERROR
Error message
Node name: {self.node.node_id}, error message: {err} What it means
Raised when writing the START node's outputs into the VariablePool fails. variable_pool.add_variable throws, and it is re-wrapped as VARIABLE_POOL_SET_PARAMETER_ERROR with the node ID and underlying message so the failure is attributed to the start node's variable registration.
Solutions
- Check the wrapped error message for the root cause (storage backend vs. schema)
- Verify Redis/DB connectivity of the variable pool backend
- Fix the start node's declared output variable names/types in the editor
- Inspect res_bak values for non-serializable objects
Example fix
// before: opaque pool write failure
await variable_pool.add_variable(node_id, keys, raw_user_input)
// after
if not all(isinstance(k, str) and k for k in keys):
raise CustomException(CodeEnum.PARAM_VALIDATE_ERROR, err_msg="invalid start output keys")
await variable_pool.add_variable(node_id, keys, sanitize(raw_user_input)) Defensive patterns
Strategy: try-catch
Validate before calling
if not redis_client.ping():
raise RuntimeError("variable pool backend (Redis) unavailable")
if any(not k or not isinstance(k, str) for k in output_keys):
raise ValueError("start node output keys must be non-empty strings") Type guard
function isValidPoolWrite(nodeId, keys, value) {
return typeof nodeId === 'string' && keys.length > 0 &&
keys.every(k => typeof k === 'string' && k) &&
isSerializable(value);
} Try / catch
try {
await engine.run(dsl)
} catch (CustomException e) when (e.code == VARIABLE_POOL_SET_PARAMETER_ERROR) {
logger.error(`pool write failed at ${e.node}: ${e.message}`);
checkBackendHealth();
throw;
} Prevention
- Monitor Redis/storage health for the variable pool backend
- Validate start node output variable names/types at save time
- Ensure user input values are JSON-serializable before run
- Test workflows with storage backends degraded to catch write paths early
When it happens
Trigger: add_variable raising due to pool storage failure (Redis/DB backend unavailable), duplicate/invalid output keys from the start node config, or wrong types in res_bak for the declared output schema.
Common situations: Redis/cache outage in the workflow runtime; a workflow where the start node's declared output variables collide or have invalid names; serialization failure of user input values.
Related errors
- VARIABLE_POOL_SET_PARAMETER_ERROR
- VARIABLE_POOL_SET_PARAMETER_ERROR
- VARIABLE_POOL_GET_PARAMETER_ERROR
- get variable error
- UPDATE_BOT_FAILED
AI-assisted analysis of iflytek/astron-agent@5e758547a8 (2026-09-12).
Data as JSON: /api/errors/6008e927f18b6e83.
Report an issue: GitHub.
Appendix: source
Thrown at core/workflow/engine/node.py:460
self, result: NodeRunResult, variable_pool: VariablePool, span_context: Span
) -> None:
"""Add start node variables to variable pool.
:param result: Start node execution result
:param variable_pool: Variable pool to add variables to
:param span_context: Tracing span context
:raises CustomException: When variable addition fails
"""
res_bak = copy.deepcopy(result)
res_bak.outputs = res_bak.inputs
output_keys = list(res_bak.outputs.keys())
try:
await variable_pool.add_variable(
result.node_id, output_keys, res_bak, span=span_context
)
except Exception as err:
raise CustomException(
err_code=CodeEnum.VARIABLE_POOL_SET_PARAMETER_ERROR,
err_msg=f"Node name: {self.node.node_id}, error message: {err}",
) from err
async def _add_end_node_variables(
self, result: NodeRunResult, variable_pool: VariablePool, span_context: Span
) -> None:
"""Add end node variables to variable pool.
:param result: End node execution result
:param variable_pool: Variable pool to add variables to
:param span_context: Tracing span context
:raises CustomException: When variable addition fails
"""
res_bak = copy.deepcopy(result)
res_bak.outputs = {}
output_keys = list(res_bak.outputs.keys())
View on GitHub (pinned to 5e758547a8)