Skip to content

Commit b1b131c

Browse files
Filter more errorProperties (#477)
* Filter more errorProperties * update * 2.16.2-rc2
1 parent a08950b commit b1b131c

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "azure-iot-toolkit",
33
"displayName": "Azure IoT Hub",
44
"description": "This extension is now a part of Azure IoT Tools extension pack. We highly recommend installing Azure IoT Tools to get full capabilities for Azure IoT development. Interact with Azure IoT Hub, IoT Device Management, IoT Edge Management, IoT Hub Device Simulation, IoT Hub Code Generation and IoT Hub Device Provisioning Service (DPS).",
5-
"version": "2.16.2-rc",
5+
"version": "2.16.2-rc2",
66
"publisher": "vsciot-vscode",
77
"aiKey": "0caaff90-cc1c-4def-b64c-3ef33615bc9b",
88
"icon": "logo.png",

src/constants.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,13 @@ export class Constants {
194194
[TemplateLanguage.Ruby]: "ruby",
195195
};
196196

197+
// 'error', 'errorMessage' and 'stack' are used in vscode-azureextensionui npm
197198
public static errorProperties = {
198199
Message: "Message",
199200
detailedMessage: "detailedMessage",
201+
error: "error",
202+
errorMessage: "errorMessage",
203+
stack: "stack",
200204
};
201205

202206
// Capture the {resource-group-name} in pattern /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/

src/simulator.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export class Simulator {
9999
if (eventName === Constants.SimulatorLaunchEvent) {
100100
TelemetryClient.sendEvent(eventName, {
101101
Result: result ? "Success" : "Fail",
102-
Error: result ? undefined : properties.error,
102+
[Constants.errorProperties.Message]: result ? undefined : properties.error,
103103
QuitWhenProcessing: this.isProcessing() ? "True" : "False",
104104
}, this.iotHubConnectionString);
105105
} else if (eventName === Constants.SimulatorSendEvent) {
@@ -114,7 +114,7 @@ export class Simulator {
114114
} else {
115115
TelemetryClient.sendEvent(eventName, {
116116
Result: "Fail",
117-
Error: "" + properties.reason,
117+
[Constants.errorProperties.Message]: "" + properties.reason,
118118
}, this.iotHubConnectionString);
119119
}
120120
} else if (eventName === Constants.SimulatorCloseEvent) {

0 commit comments

Comments
 (0)