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
Have FileSystemError adopt ErrorNoTelemetry #155885
Conversation
@lramos15 does it have ENOPRO in the dialog? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may be user facing in certain cases, so what is the reason for making the error name rather cryptic by concatenating ErrorNoTelemetry
and the original name
? I would rather use something that is more generic, since I believe the main intent is to implement isErrorNoTelemetry
properly:
public override set name(newName: string) {
this._name = `${newName} (CodeExpectedError)`;
}
public static isErrorNoTelemetry(err: Error): err is ErrorNoTelemetry {
return err.name.contains('(CodeExpectedError)');
}
I think CodeExpectedError
can be something else too, if we want to go with node.js notion, maybe EEXPECTED
).
Yeah we can go with anything here. I think the main goal with sticking with |
I went with a very simple solution here as further exploration looked like it was going to break things down the line. I believe FileSystemErrors are the most complex case so my fix is ok but I wish everything could go through |
Fixes #155492
Allow setting error name with
ErrorNoTelemetry
. Tested on throwing a filesystem error but it presents a modal without any notion of ErrorNoTelemetry. If anyone has a notifcation example I can also test making sure it doesn't show up there.