diff --git a/src/Infrastructure/BotSharp.Core/Agents/Services/AgentService.GetAgents.cs b/src/Infrastructure/BotSharp.Core/Agents/Services/AgentService.GetAgents.cs index 6db0819a..9fe90e8c 100644 --- a/src/Infrastructure/BotSharp.Core/Agents/Services/AgentService.GetAgents.cs +++ b/src/Infrastructure/BotSharp.Core/Agents/Services/AgentService.GetAgents.cs @@ -48,8 +48,8 @@ public partial class AgentService if (profile == null) { - _logger.LogError($"Can't find agent {id}"); - return null; + //_logger.LogError($"Can't find agent {id}"); + throw new ArgumentException($"Can't find agent {id}"); } // Load llm config