Azure / azure-iot-middleware-freertos

Azure IoT Middleware for FreeRTOS
https://azure.github.io/azure-iot-middleware-freertos/
MIT License
79 stars 25 forks source link

AzureIoTResult return code for AzureIoTHubClient_Connect on refused connection #242

Closed MarcGeh closed 1 year ago

MarcGeh commented 2 years ago

Hello everyone, I have a feature request. With the current implementation of AzureIoTHubClient_Connect it is not possible to determine why the connection failed. xResult is always eAzureIoTErrorFailed regardless of the value of xMQTTResult. However as a user of the API it is necessary for me to tell the difference between a refused connection (MQTTServerRefused) or if the connection failed because of other reasons. In some cases it might be necessary to redo the provisioning if the server refuses the connection. For that purpose I propose the addition of a new enum value for AzureIoTResult that is returned by AzureIoTHubClient_Connect in case the connection got refused.

ewertons commented 1 year ago

Hi @MarcGeh , sorry for the delay. Unfortunately we will not be able to take this change in. Please see the reasoning in the linked PR #243