Skip to content

Log the response text if available when exception is thrown while processing a user query #338

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

Merged
merged 1 commit into from
Feb 12, 2025

Conversation

daxian-dbw
Copy link
Member

PR Summary

When an exception is thrown while processing a user query, we log the exception and the response text if it's available.
This can help us diagnose the exception. The response text is logged to the local log, not sent to the telemetry, so there is no privacy issue.

This PR also reset _copilotResponse and the placeholder data when /refresh or when the user sends a new query, so that old data doesn't interfere when user runs /replace after /refresh, or when user runs /replace after it fails to get a response from Azure Copilot.

@daxian-dbw daxian-dbw merged commit 119e6a8 into PowerShell:main Feb 12, 2025
4 checks passed
@daxian-dbw daxian-dbw deleted the morelog branch February 12, 2025 21:34
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.

1 participant