mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Clean up extension telemetry (#5596)
This commit is contained in:
@@ -36,4 +36,26 @@ export function doubleEscapeSingleQuotes(value: string): string {
|
||||
*/
|
||||
export function backEscapeDoubleQuotes(value: string): string {
|
||||
return value.replace(/"/g, '\\"');
|
||||
}
|
||||
|
||||
/**
|
||||
* Map an error message into a GDPR-Compliant short name for the type of error.
|
||||
* @param msg The error message to map
|
||||
*/
|
||||
export function getTelemetryErrorType(msg: string): string {
|
||||
if (msg.indexOf('is not recognized as an internal or external command') !== -1) {
|
||||
return 'ExeNotFound';
|
||||
}
|
||||
else if (msg.indexOf('Unknown Action') !== -1) {
|
||||
return 'UnknownAction';
|
||||
}
|
||||
else if (msg.indexOf('No Action Provided') !== -1) {
|
||||
return 'NoActionProvided';
|
||||
}
|
||||
else if (msg.indexOf('Run exception') !== -1) {
|
||||
return 'RunException';
|
||||
}
|
||||
else {
|
||||
return 'Other';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user