Show detailed deployment error message, and minor fix (#26)
This commit is contained in:
Родитель
8d9b1d636c
Коммит
d195687640
|
@ -145,6 +145,9 @@ export class IoTEdgeExplorer extends BaseExplorer {
|
|||
})
|
||||
.catch((err) => {
|
||||
this.outputLine(label, `Deployment failed. ${err}`);
|
||||
if (err && err.response && err.response.data && err.response.data.Message) {
|
||||
this.outputLine(label, err.response.data.Message);
|
||||
}
|
||||
TelemetryClient.sendEvent(Constants.IoTHubAIEdgeDeployDoneEvent, { Result: "Fail", Message: err });
|
||||
});
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ export class IotHubC2DMessageExplorer extends BaseExplorer {
|
|||
return;
|
||||
}
|
||||
|
||||
let deviceConnectionString = deviceItem.connectionString ?
|
||||
let deviceConnectionString = (deviceItem && deviceItem.connectionString) ?
|
||||
deviceItem.connectionString : await Utility.getConnectionString(Constants.DeviceConnectionStringKey,
|
||||
Constants.DeviceConnectionStringTitle);
|
||||
if (!deviceConnectionString) {
|
||||
|
|
|
@ -17,7 +17,7 @@ export class IoTHubMessageExplorer extends BaseExplorer {
|
|||
}
|
||||
|
||||
public async sendD2CMessage(deviceItem?: DeviceItem) {
|
||||
let deviceConnectionString = deviceItem.connectionString ?
|
||||
let deviceConnectionString = (deviceItem && deviceItem.connectionString) ?
|
||||
deviceItem.connectionString : await Utility.getConnectionString(Constants.DeviceConnectionStringKey,
|
||||
Constants.DeviceConnectionStringTitle);
|
||||
if (!deviceConnectionString) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче