iflytek/astron-agent · error · CustomException
ENG_PROTOCOL_VALIDATE_ERROR
ENG_PROTOCOL_VALIDATE_ERROR
Error message
Current workflow does not support node type: {node.get_node_type()} What it means
Raised by NodeFactory.create when the workflow engine's tool_classes registry (built from workflow.engine.nodes.cache_node) has no node class registered for the given node's type string. The engine cannot instantiate a node whose type it does not recognize, so it fails protocol validation with ENG_PROTOCOL_VALIDATE_ERROR. This usually means the workflow definition references a node type from a newer/older version or a plugin node that is not loaded.
Solutions
- Check the node_type value in the workflow definition against the registry keys in workflow/engine/nodes/cache_node.tool_classes and correct any typo
- Upgrade or fix the deployment so the plugin/module registering that node class is loaded (verify cache_node imports all node modules)
- Remove or replace the unsupported node in the workflow DSL with a supported equivalent type
- If the workflow came from another version, re-export it from a matching engine version
Example fix
// before (workflow DSL)
{"type": "agentNode_v3"}
// after
{"type": "agent"} Defensive patterns
Strategy: validation
Validate before calling
from workflow.engine.nodes.cache_node import tool_classes
def node_type_supported(node_type: str) -> bool:
return node_type in tool_classes Try / catch
try:
node = NodeFactory.create(node_data)
except CustomException as e:
if e.err_code == CodeEnum.ENG_PROTOCOL_VALIDATE_ERROR:
log.warning("unsupported node type skipped: %s", node_data.get("type"))
return None
raise Prevention
- Validate imported workflow DSLs against the current engine's node registry before import
- Keep node modules imported in cache_node so all types are registered
- Avoid hand-editing node type strings in workflow JSON
When it happens
Trigger: Calling NodeFactory.create (directly or via workflow instantiation) with a node whose get_node_type() returns a string not present in tool_classes — e.g. an imported workflow DSL containing a node type this deployment does not support, or a typo in a hand-edited workflow JSON.
Common situations: Importing an exported workflow from a different product version that contains node types not yet released in this engine; disabling a plugin module so its node class is never registered; hand-editing workflow definitions and misspelling the node type.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
AI-assisted analysis of iflytek/astron-agent@5e758547a8 (2026-09-12).
Data as JSON: /api/errors/d6e81024ca2ab365.
Report an issue: GitHub.
Appendix: source
Thrown at core/workflow/engine/node.py:773
class NodeFactory:
"""Factory class for creating workflow engine nodes."""
@staticmethod
def create(node: Node, span_context: Span) -> SparkFlowEngineNode:
"""
Create a node instance.
:param node: Node data
:param span_context: Span context for tracing
:return: Created node instance
:raises CustomException: When node type is not supported
"""
from workflow.engine.nodes.cache_node import tool_classes
node_class = tool_classes.get(node.get_node_type())
if not node_class:
raise CustomException(
CodeEnum.ENG_PROTOCOL_VALIDATE_ERROR,
err_msg=f"Current workflow does not support node type: {node.get_node_type()}",
cause_error=f"Current workflow does not support node type: {node.get_node_type()}",
)
if not node.data:
return node_class(span=span_context)
# Get basic configuration
inputs = node.data.inputs
outputs = node.data.outputs
# Build retry configuration
retry_config = node.data.retryConfig
retry_config.custom_output = NodeFactory._check_custom_output(
retry_config.custom_output, outputs, span_context
)
View on GitHub (pinned to 5e758547a8)