From e6d611abe4dd5e9b630f145096637be3cdac469a Mon Sep 17 00:00:00 2001 From: Chris <66376200+crickman@users.noreply.github.com> Date: Tue, 15 Jul 2025 14:11:31 -0700 Subject: [PATCH] Display thread type name in error message (#192) --- dotnet/src/Microsoft.Extensions.AI.Agents.Abstractions/Agent.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotnet/src/Microsoft.Extensions.AI.Agents.Abstractions/Agent.cs b/dotnet/src/Microsoft.Extensions.AI.Agents.Abstractions/Agent.cs index 611d983be2..89f51cc683 100644 --- a/dotnet/src/Microsoft.Extensions.AI.Agents.Abstractions/Agent.cs +++ b/dotnet/src/Microsoft.Extensions.AI.Agents.Abstractions/Agent.cs @@ -203,7 +203,7 @@ public abstract class Agent if (thread is not TThreadType concreteThreadType) { - throw new NotSupportedException($"{this.GetType().Name} currently only supports agent threads of type {nameof(TThreadType)}."); + throw new NotSupportedException($"{this.GetType().Name} currently only supports agent threads of type {typeof(TThreadType).Name}."); } return concreteThreadType;