Azure / azure-iot-remote-monitoring

Azure IoT Remote Monitoring preconfigured solution
Other
249 stars 221 forks source link

Preconfigured solution isn't honoring status code in device message body #456

Closed TylerLeonhardt closed 3 years ago

TylerLeonhardt commented 6 years ago

My device is using the C# sdk and I wanted to send a 500 back when an error occurred on the device.

In the C# sdk, you can do this which will send back a 500 via the status property: retValue = new MethodResponse(new byte[0], 500);

I can confirm 500 is being sent over using the iothub-explorer:

> iothub-explorer device-method mbp error {}
{"status":500,"payload":{"rip":true}}

where mbp is the deviceid and error is the direct method name.

In the preconfigured solution, I see this: microsoftteams-image

which says it succeeded when it should have failed.

Any thoughts?

ankitscribbles commented 3 years ago

Note: As of December 10th 2020, Remote Monitoring solution accelerator is no longer supported. All supporting repositories have been archived.