{"record":{"id":"4dc6189147dd1c19","repo":"iflytek/astron-agent","slug":"unsupported-protocol-protocol","errorCode":null,"errorMessage":"Unsupported protocol: {protocol}","messagePattern":"Unsupported protocol: (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"core/workflow/engine/nodes/util/frame_processor.py","lineNumber":386,"sourceCode":"        FrameProcessorEnum.OPENAI.value: OpenAIFrameProcessor,\n        FrameProcessorEnum.ANTHROPIC.value: AnthropicFrameProcessor,\n        FrameProcessorEnum.GOOGLE.value: GoogleFrameProcessor,\n        FrameProcessorEnum.KNOWLEDGE_PRO.value: KnowledgeProFrameProcessor,\n        FrameProcessorEnum.FLOW.value: FlowFrameProcessor,\n    }\n\n    @staticmethod\n    def get_processor(protocol: str) -> FrameProcessor:\n        \"\"\"\n        Get frame processor instance for the specified protocol.\n\n        :param protocol: Protocol type string\n        :return: Frame processor instance for the protocol\n        :raises ValueError: If protocol is not supported\n        \"\"\"\n        processor_class = FrameProcessorFactory._processors.get(protocol)\n        if not processor_class:\n            raise ValueError(f\"Unsupported protocol: {protocol}\")\n        # All registered processors are concrete subclasses of FrameProcessor\n        return cast(FrameProcessor, processor_class())\n","sourceCodeStart":368,"sourceCodeEnd":389,"githubUrl":"https://github.com/iflytek/astron-agent/blob/5e758547a83371a5a4b29dadf4ac03e8dd527635/core/workflow/engine/nodes/util/frame_processor.py#L368-L389","documentation":"FrameProcessorFactory.get_processor looks up a registered processor class by protocol string. When no processor is registered under the given protocol name (the dict lookup returns None), it raises ValueError because it cannot produce a FrameProcessor for an unknown protocol.","triggerScenarios":"Calling get_processor with a protocol string that was never registered via FrameProcessorFactory (typo like 'http ' or 'websocket' vs 'ws', or a protocol node type added in config but not registered).","commonSituations":"Configuring a workflow node with a protocol name that differs from the registered key; new protocol plugins not registered at startup; case/whitespace mismatch in protocol strings.","solutions":["Check the protocol string passed in and correct it to a registered protocol name","Verify the processor class is registered via FrameProcessorFactory registration before get_processor is called","Add a registration for the new protocol if it is a legitimately new protocol","Normalize/trim/lowercase the protocol string before lookup"],"exampleFix":"# before\nprocessor = FrameProcessorFactory.get_processor(protocol=\"SSE \")\n# after\nprocessor = FrameProcessorFactory.get_processor(protocol=\"sse\")","handlingStrategy":"validation","validationCode":"if protocol not in FrameProcessorFactory._processors:\n    raise ValueError(f\"protocol '{protocol}' not registered; known: {list(FrameProcessorFactory._processors)}\")","typeGuard":"def is_supported_protocol(protocol: str) -> bool:\n    return isinstance(protocol, str) and protocol in FrameProcessorFactory._processors","tryCatchPattern":null,"preventionTips":["Register every new protocol processor at service startup","Keep protocol names in a shared constant/enum","Normalize protocol strings (strip/lower) before lookup","Add a startup self-test that resolves all configured protocols"],"tags":["factory","unsupported-protocol","configuration"],"backgroundTag":"unsupported-operation","analyzedSha":"5e758547a83371a5a4b29dadf4ac03e8dd527635","analyzedAt":"2026-09-12T08:03:51.356Z","contentChangedAt":"2026-09-12T08:03:51.356Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}