Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a null-ref exception and add telemetry for error response from Az Copilot #291

Merged
merged 1 commit into from
Nov 13, 2024

Conversation

daxian-dbw
Copy link
Member

@daxian-dbw daxian-dbw commented Nov 13, 2024

PR Summary

Fix #290

I cannot reproduce the issue locally, but by looking at the code based on the error messages in the screenshot, I believe it was because the error response from Azure Copilot did not contain ConversationState when the problem happened. So, I'm adding a check to update _turnsLeft only if ConversationState is not null.

I also added a telemetry when receiving error response from Azure Copilot.

It's easier to review by ignoring all whitespace changes: https://github.com/PowerShell/ProjectMercury/pull/291/files?w=1

@daxian-dbw daxian-dbw merged commit d408899 into PowerShell:main Nov 13, 2024
4 checks passed
@daxian-dbw daxian-dbw deleted the nullref branch November 13, 2024 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to ask a question, getting a object reference not found
1 participant