{"record":{"id":"e6a95e6b6d9039af","repo":"microsoft/vscode","slug":"result-reason","errorCode":null,"errorMessage":"${result.reason}","messagePattern":"\\$\\{result\\.reason\\}","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"extensions/copilot/src/extension/conversation/vscode-node/languageModelAccess.ts","lineNumber":873,"sourceCode":"\t\t\tif (result.type === ChatFetchResponseType.ExtensionBlocked) {\n\t\t\t\tif (extensionId) {\n\t\t\t\t\tthis._blockedExtensionService.reportBlockedExtension(extensionId, result.retryAfter);\n\t\t\t\t}\n\n\t\t\t\tthrow vscode.LanguageModelError.Blocked(blockedExtensionMessage);\n\t\t\t} else if (result.type === ChatFetchResponseType.QuotaExceeded) {\n\t\t\t\tconst outageStatus = await this._octoKitService.getGitHubOutageStatus();\n\t\t\t\tconst details = getErrorDetailsFromChatFetchError(result, this._authenticationService.copilotToken?.copilotPlan, outageStatus, this._authenticationService.copilotToken?.tokenBasedBilling, this._authenticationService.copilotToken?.quotaInfo.quota_reset_date);\n\t\t\t\tconst err = new vscode.LanguageModelError(details.message);\n\t\t\t\terr.name = 'ChatQuotaExceeded';\n\t\t\t\tthrow err;\n\t\t\t} else if (result.type === ChatFetchResponseType.RateLimited) {\n\t\t\t\tconst err = new Error(result.reason);\n\t\t\t\terr.name = 'ChatRateLimited';\n\t\t\t\tthrow err;\n\t\t\t}\n\n\t\t\tthrow new Error(result.reason);\n\t\t}\n\n\t\tthis._telemetryService.sendInternalMSFTTelemetryEvent(\n\t\t\t'languagemodelrequest',\n\t\t\t{\n\t\t\t\textensionId,\n\t\t\t\textensionVersion,\n\t\t\t\trequestid: result.requestId,\n\t\t\t\tquery: getTextPart(messages[messages.length - 1].content),\n\t\t\t\tmodel: _endpoint.model\n\t\t\t},\n\t\t\t{\n\t\t\t\ttokenCount,\n\t\t\t\ttokenLimit\n\t\t\t}\n\t\t);\n\n\t\treturn result.usage;","sourceCodeStart":855,"sourceCodeEnd":891,"githubUrl":"https://github.com/microsoft/vscode/blob/a94b963a32aa9749d69504576791fa29700ae46d/extensions/copilot/src/extension/conversation/vscode-node/languageModelAccess.ts#L855-L891","documentation":"Error \"${result.reason}\" thrown in microsoft/vscode.","triggerScenarios":"Thrown at extensions/copilot/src/extension/conversation/vscode-node/languageModelAccess.ts:873 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"a94b963a32aa9749d69504576791fa29700ae46d","analyzedAt":"2026-08-12T01:08:56.794Z","schemaVersion":2},"datasetVersion":"2026-08-12T06:17:24.410Z"}