Skip to content
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

Unable to read file errors are being localized and showing up in telemetry #155492

Closed
Tyriar opened this issue Jul 18, 2022 · 1 comment · Fixed by #155885
Closed

Unable to read file errors are being localized and showing up in telemetry #155492

Tyriar opened this issue Jul 18, 2022 · 1 comment · Fixed by #155885
Assignees
Labels
error-telemetry VS Code - Issues generated by telemetry file-io File I/O insiders-released Patch has been released in VS Code Insiders
Milestone

Comments

@Tyriar
Copy link
Member

Tyriar commented Jul 18, 2022

const message = localize('err.read', "Unable to read file '{0}' ({1})", this.resourceForError(resource), ensureFileSystemProviderError(error).toString());
if (error instanceof NotModifiedSinceFileOperationError) {
throw new NotModifiedSinceFileOperationError(message, error.stat, options);
} else {
throw new FileOperationError(message, toFileOperationResult(error), options);
}

This shows up in telemetry: 无法读取文件

Should FileOperationError extend NoErrorTelemetry?

https://vscode-errors.azurewebsites.net/card?ch=f3528d481b366b24321c382d5e5849f4c7d65248&bH=aa9e18ff-8c8f-1c63-d265-d1d3cb2ba855
https://vscode-errors.azurewebsites.net/card?ch=f3528d481b366b24321c382d5e5849f4c7d65248&bH=749131eb-6952-232e-4533-df818832582b

@bpasero bpasero added this to the July 2022 milestone Jul 18, 2022
@bpasero bpasero added the file-io File I/O label Jul 18, 2022
@Tyriar Tyriar added the error-telemetry VS Code - Issues generated by telemetry label Jul 18, 2022
@bpasero bpasero assigned lramos15 and unassigned bpasero Jul 18, 2022
@bpasero
Copy link
Member

bpasero commented Jul 19, 2022

As discussed, I can review a PR. One interesting aspect of file errors are that we use the error name as a way to deserialise errors from extensions on the renderer:

export enum FileSystemProviderErrorCode {
FileExists = 'EntryExists',
FileNotFound = 'EntryNotFound',
FileNotADirectory = 'EntryNotADirectory',
FileIsADirectory = 'EntryIsADirectory',
FileExceedsMemoryLimit = 'EntryExceedsMemoryLimit',
FileTooLarge = 'EntryTooLarge',
FileWriteLocked = 'EntryWriteLocked',
NoPermissions = 'NoPermissions',
Unavailable = 'Unavailable',
Unknown = 'Unknown'
}

@lramos15 lramos15 modified the milestones: July 2022, August 2022 Jul 22, 2022
@lramos15 lramos15 modified the milestones: August 2022, On Deck Aug 16, 2022
@VSCodeTriageBot VSCodeTriageBot added the unreleased Patch has not yet been released in VS Code Insiders label Aug 16, 2022
@bpasero bpasero modified the milestones: On Deck, August 2022 Aug 16, 2022
@VSCodeTriageBot VSCodeTriageBot added insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Aug 17, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Sep 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
error-telemetry VS Code - Issues generated by telemetry file-io File I/O insiders-released Patch has been released in VS Code Insiders
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants