Skip to content

Commit 658d947

Browse files
committed
Fix a bug to only report unexpected errors
1 parent b7c4833 commit 658d947

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

shell/agents/Microsoft.Azure.Agent/ChatSession.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,9 @@ private async Task<string> SetupNewChat(IStatusContext context, CancellationToke
132132
}
133133
catch (Exception e)
134134
{
135-
if (e is not OperationCanceledException and TokenRequestException)
135+
if (e is not OperationCanceledException and not TokenRequestException)
136136
{
137+
// Trace a telemetry for any unexpected error.
137138
Telemetry.Trace(AzTrace.Exception("Failed to setup a new chat session."), e);
138139
}
139140

0 commit comments

Comments
 (0)