diff --git a/Extension/src/LanguageServer/extension.ts b/Extension/src/LanguageServer/extension.ts index 7f0f4338df..d418924d38 100644 --- a/Extension/src/LanguageServer/extension.ts +++ b/Extension/src/LanguageServer/extension.ts @@ -1489,11 +1489,10 @@ async function onCopilotHover(): Promise { } async function reportCopilotFailure(copilotHoverProvider: CopilotHoverProvider, hoverDocument: vscode.TextDocument, hoverPosition: vscode.Position, customError?: string): Promise { - const defaultError: string = "An error occurred while generating Copilot summary."; - const errorMessage = customError ? customError : defaultError; - telemetry.logLanguageServerEvent("CopilotHoverError", { errorMessage }); + const errorMessage = customError ? customError : ""; + telemetry.logLanguageServerEvent("CopilotHoverError", { "ErrorMessage": errorMessage }); // Display the localized default failure message in the hover. - await showCopilotContent(copilotHoverProvider, hoverDocument, hoverPosition, localize("copilot.hover.error", defaultError)); + await showCopilotContent(copilotHoverProvider, hoverDocument, hoverPosition, localize("copilot.hover.error", "An error occurred while generating Copilot summary.")); } async function showCopilotContent(copilotHoverProvider: CopilotHoverProvider, hoverDocument: vscode.TextDocument, hoverPosition: vscode.Position, content?: string): Promise {