Update AgentService.GetAgents.cs

can't not find agent throw exception
This commit is contained in:
Jack 2025-04-30 15:51:09 +08:00 committed by GitHub
parent a3aabe29aa
commit ba827378f0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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