Azure / iotedgedev

The Azure IoT Edge Dev Tool greatly simplifies your Azure IoT Edge development process. It has everything you need to get started and helps with your day-to-day Edge development.
https://aka.ms/iotedgedev
Other
160 stars 71 forks source link

Print error traceback upon unauthorised error when running `iotedgedev monitor` #557

Closed beandrad closed 2 years ago

beandrad commented 2 years ago

When using an incorrect IoT Hub connection string, for instance, one that doesn't have the necessary permissions to monitor events when running iotedgedev monitor the error doesn't display any details about the root cause. This lack of information makes it difficult to identify the issue.

image

Steps to Reproduce:

  1. Set environment variable DEVICE_CONNECTION_STRING.
  2. Set environment variable IOTHUB_CONNECTION_STRING, use the credentials corresponding to a policy different from iothubowner to force the authorization error.
  3. Run iotedgedev monitor.