Skip to content
This repository was archived by the owner on Jan 30, 2026. It is now read-only.

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

Merged
daxian-dbw merged 1 commit intoPowerShell:mainfrom
daxian-dbw:morelog
Feb 12, 2025
Merged

Log the response text if available when exception is thrown while processing a user query#338
daxian-dbw merged 1 commit intoPowerShell:mainfrom
daxian-dbw:morelog

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant