{"record":{"id":"15551d0822953e95","repo":"microsoft/semantic-kernel","slug":"no-topic-names-registered","errorCode":null,"errorMessage":"No topic names registered","messagePattern":"No topic names registered","errorType":"validation","errorClass":"ArgumentException","httpStatus":null,"severity":"error","filePath":"dotnet/src/Experimental/Process.Core/ProcessProxyBuilder.cs","lineNumber":25,"sourceCode":"using Microsoft.SemanticKernel.Process.Models;\n\nnamespace Microsoft.SemanticKernel;\n\n/// <summary>\n/// Provides functionality to allow emitting external messages from within the SK\n/// process.\n/// </summary>\npublic sealed class ProcessProxyBuilder : ProcessStepBuilder<KernelProxyStep>\n{\n    /// <summary>\n    /// Initializes a new instance of the <see cref=\"ProcessProxyBuilder\"/> class.\n    /// </summary>\n    internal ProcessProxyBuilder(IReadOnlyList<string> externalTopics, string name, ProcessBuilder? processBuilder)\n        : base(name, processBuilder)\n    {\n        if (externalTopics.Count == 0)\n        {\n            throw new ArgumentException(\"No topic names registered\");\n        }\n\n        this._externalTopicUsage = externalTopics.ToDictionary(topic => topic, topic => false);\n        if (this._externalTopicUsage.Count < externalTopics.Count)\n        {\n            throw new ArgumentException(\"Topic names registered must be different\");\n        }\n    }\n\n    /// <summary>\n    /// Version of the proxy step, used when saving the state of the step.\n    /// </summary>\n    public string Version { get; init; } = \"v1\";\n\n    internal readonly Dictionary<string, bool> _externalTopicUsage;\n\n    // For supporting multiple step edges getting linked to the same external topic, current implementation needs to be updated\n    // to instead have a list of potential edges in case event names in different steps have same name","sourceCodeStart":7,"sourceCodeEnd":43,"githubUrl":"https://github.com/microsoft/semantic-kernel/blob/c028a0c7dc4f0814cdcbaba9d998f187a41197bf/dotnet/src/Experimental/Process.Core/ProcessProxyBuilder.cs#L7-L43","documentation":"Thrown by the ProcessProxyBuilder constructor when the externalTopics list is empty. A proxy step exists solely to publish events to external topics, so at least one topic name must be provided at construction time.","triggerScenarios":"Calling new ProcessProxyBuilder(externalTopics: new List<string>(), ...) directly, or calling process.AddProxyStep(id, externalTopics: []) with an empty topic list.","commonSituations":"Building a proxy step dynamically from configuration where the topics list was not populated; passing a default/empty list because the topics come from a source that returned no values; copy-pasting a proxy setup and forgetting to fill in topics.","solutions":["Provide at least one topic name when constructing the proxy step or calling AddProxyStep.","If topics come from configuration, validate the configuration source returns at least one topic before calling AddProxyStep.","Consider whether a proxy step is needed at all if there are no external topics — proxy steps without topics serve no purpose."],"exampleFix":"// before\nprocess.AddProxyStep(\"myProxy\", externalTopics: new List<string>());\n\n// after\nprocess.AddProxyStep(\"myProxy\", externalTopics: new List<string> { \"topic1\", \"topic2\" });","handlingStrategy":"validation","validationCode":"if (externalTopics is null || externalTopics.Count == 0)\n    throw new ArgumentException(\"At least one external topic is required for a proxy step.\", nameof(externalTopics));\n\nprocess.AddProxyStep(\"myProxy\", externalTopics);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate the topics list is non-empty before calling AddProxyStep.","If topics come from configuration, validate the config source returns at least one value.","Question whether a proxy step is needed if there are no topics to publish to."],"tags":["proxy-step","validation","topic-registration","dotnet"],"backgroundTag":null,"analyzedSha":"c028a0c7dc4f0814cdcbaba9d998f187a41197bf","analyzedAt":"2026-08-13T13:48:05.040Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}