{"record":{"id":"2994125fdd61de64","repo":"microsoft/vscode","slug":"failed-to-upload-file-response-statustext","errorCode":null,"errorMessage":"Failed to upload file: ${response.statusText}","messagePattern":"Failed to upload file: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"extensions/copilot/src/extension/inlineEdits/vscode-node/components/nesFeedbackSubmitter.ts","lineNumber":667,"sourceCode":"\t\t};\n\n\t\t// Use native fetch for PUT request (IFetcherService only supports GET/POST)\n\t\tconst response = await fetch(url, {\n\t\t\tmethod: 'PUT',\n\t\t\theaders: {\n\t\t\t\t'Authorization': `Bearer ${token}`,\n\t\t\t\t'Accept': 'application/vnd.github+json',\n\t\t\t\t'Content-Type': 'application/json',\n\t\t\t\t'X-GitHub-Api-Version': '2022-11-28',\n\t\t\t\t'User-Agent': this._fetcherService.getUserAgentLibrary()\n\t\t\t},\n\t\t\tbody: JSON.stringify(payload)\n\t\t});\n\n\t\tif (!response.ok) {\n\t\t\tconst errorText = await response.text();\n\t\t\tthis._logger.error(`Failed to create file ${path}: ${response.status} ${response.statusText} - ${errorText}`);\n\t\t\tthrow new Error(`Failed to upload file: ${response.statusText}`);\n\t\t}\n\t}\n\n\t/**\n\t * Get the current authenticated GitHub user.\n\t */\n\tprivate async _getCurrentUser(token: string): Promise<{ login: string } | undefined> {\n\t\ttry {\n\t\t\tconst response = await this._fetcherService.fetch(\n\t\t\t\t`${this._repoConfig.apiUrl}/user`,\n\t\t\t\t{\n\t\t\t\t\tmethod: 'GET',\n\t\t\t\t\tcallSite: 'nes-feedback-current-user',\n\t\t\t\t\theaders: {\n\t\t\t\t\t\t'Authorization': `Bearer ${token}`,\n\t\t\t\t\t\t'Accept': 'application/vnd.github+json',\n\t\t\t\t\t\t'X-GitHub-Api-Version': '2022-11-28',\n\t\t\t\t\t\t'User-Agent': this._fetcherService.getUserAgentLibrary()","sourceCodeStart":649,"sourceCodeEnd":685,"githubUrl":"https://github.com/microsoft/vscode/blob/a94b963a32aa9749d69504576791fa29700ae46d/extensions/copilot/src/extension/inlineEdits/vscode-node/components/nesFeedbackSubmitter.ts#L649-L685","documentation":"Error \"Failed to upload file: ${response.statusText}\" thrown in microsoft/vscode.","triggerScenarios":"Thrown at extensions/copilot/src/extension/inlineEdits/vscode-node/components/nesFeedbackSubmitter.ts:667 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"}